{"action":"reopened","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/10978","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/10978/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/10978/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/10978/events","html_url":"https://github.com/magento/magento2/issues/10978","id":259389862,"number":10978,"title":"Multi website - customer create form - Attribute Cache not taking account the current website/store","user":{"login":"eInyzant","id":3170715,"avatar_url":"https://avatars2.githubusercontent.com/u/3170715?v=4","gravatar_id":"","url":"https://api.github.com/users/eInyzant","html_url":"https://github.com/eInyzant","followers_url":"https://api.github.com/users/eInyzant/followers","following_url":"https://api.github.com/users/eInyzant/following{/other_user}","gists_url":"https://api.github.com/users/eInyzant/gists{/gist_id}","starred_url":"https://api.github.com/users/eInyzant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eInyzant/subscriptions","organizations_url":"https://api.github.com/users/eInyzant/orgs","repos_url":"https://api.github.com/users/eInyzant/repos","events_url":"https://api.github.com/users/eInyzant/events{/privacy}","received_events_url":"https://api.github.com/users/eInyzant/received_events","type":"User","site_admin":false},"labels":[{"id":686477444,"url":"https://api.github.com/repos/magento/magento2/labels/Fixed%20in%202.2.x","name":"Fixed in 2.2.x","color":"0e8a16","default":false},{"id":688811200,"url":"https://api.github.com/repos/magento/magento2/labels/G1%20Passed","name":"G1 Passed","color":"0e8a16","default":false},{"id":686420665,"url":"https://api.github.com/repos/magento/magento2/labels/G2%20Passed","name":"G2 Passed","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-09-21T06:36:14Z","updated_at":"2018-02-05T13:52:32Z","closed_at":null,"author_association":"NONE","body":"### Preconditions\r\n1. Magento CE 2.1.9\r\n2. Multi website / and multi stores (B2B (with languages : FR, EN) + B2C (with languages FR, EN, JP)\r\n3. Php 5.6\r\n\r\n### Steps to reproduce\r\n<!--- Provide a set of unambiguous steps to reproduce this bug include code, if relevant  -->\r\n1. For the B2b website I want to display Tax / Vat field. And I don't want to display DOB field\r\n2. For the B2C website I don't want to display Tax / Vat field, but I do want to display DOB field (optional).\r\n3. So I set up these parameters in the backend Stores => Settings/Configuration => Customers / Customers configuration => Name and Address Options\r\n\r\n| Website | Setting | Value |\r\n| - | - | - |\r\n| B2B | Show Date of birth | No\r\n|B2B | Show Tax/VAT Number | Optional |\r\n| B2C | Show Date of birth | Otptional |\r\n| B2C | Show Tax/VAT Number | No |\r\n\r\n### Expected result\r\n1. I flush all cache\r\n2. I go to B2B website on customer/account/create => generate form and display Tax / Vat field as optional and hide Dob field\r\n3. I go to B2C website on customer/account/create => generate form and display Dob field as optional but hide Tax / Vat field.\r\n\r\n### Actual result\r\n<!--- Tell us what happens instead -->\r\n1. I flush all cache\r\n2. I go to B2B website on customer/account/create => generate form and it display Tax / Vat field as optional and hide Dob field => OK!\r\n3. I go to B2C website on customer/account/create => generate form and it display the same form as B2B website => NOK!\r\n\r\n4. I flush cache\r\n5. I go to B2C website on customer/account/create => generate form and it display Dob field as optional but hide Tax / Vat field => OK!\r\n6. I go to B2B website on customer/account/create => gernerate form and it display the same form as B2C website => NOK!\r\n\r\ngoing deeper in the code I think the problem is related to the AttributeCache class :\r\n\r\nMagento\\Customer\\Block\\Widget\\Taxvat\r\nMagento\\Customer\\Block\\Widget\\AbstractWidget::_getAttribute (:96)\r\nMagento\\Customer\\Model\\Metadata::getAttributeMetadata (:62)\r\nMagento\\Eav\\Model\\Entity\\AttributeCache::saveAttributes (:108)\r\n=> The cache Key does not take the website_id or store_id into account.\r\nSo once it is cached on a website it will give the same result on the other websites.\r\n"}}
{"actor":{"display_login":"orlangur"}}