3

In my magento 2.3 I have two store views. I noticed today in product page in every field which has store view, the use default value isn't working as expected.

For example:

I have a product in default store view with

Name: test

Attribute 1: test

I change store view to my English store, uncheck use default value and change same product:

Name: Test EN

Attribute 1: Test EN

Now I have default store view and English store view saved.

If I go back to product, English store and in

Name

Attribute 1

Press the use default value it should take the fields from the default store. Like in Magento 1. In my example:

Name: test

Attribute 1: test

But instead it gets null. Blank field

Has anyone this problem? Is this a bug?

1

Magento 2.1.x and 2.2.x Open Source has a a serious bug when editing a product at the store-view level. This bug causes the “Use Default Value” checkboxes to become unchecked when editing a product at the store view level.

Merchants which multiple websites or locales often need to maintain slightly different product content at the store view level. however there is a bug, as described below:

  1. Merchant edits a product at a store view level.
  2. Merchant updates one or more store-level attributes and clicks SAVE
  3. All store level attributes in the non-opened tabs have the checkbox “Use Default Value” unchecked after refreshing the page (they are all checked on the initial page load).
  4. This happens behind the scenes, and the merchant doesn’t notice until later, and they ask themselves “Did I really come in here and uncheck all these boxes?”

The issue is caused by 2 distinct bugs in the Magento 2 source code:

  1. When a product is saved, any attributes located in in a NON OPENED TAB do not properly communicate to the server that they should use the default value.
  2. Magento 2 has a special module built in to auto generate the URL for a product if the merchant doesn’t enter one. This module has a side effect of incorrectly unsetting the “Use Default Value” checkbox on the URL attribute when a product is saved at the store view level.

Solution Use this extension: https://github.com/cadencelabs/magento2-scope-fix

Reference: https://www.cadence-labs.com/2018/03/magento-2-use-default-value-store-view-scope-fix/

I hope this will help

  • Hi @Muhammad Hasham . I know about this bug. But I thought this is fixed in 2.3 version, isn’t it? I use magento 2.3 – G. G. Mar 9 at 11:29
  • Hi @G.G., I am also using magento EE 2.3 but I never experience this situation.when I was on 2.2,I faced the same issue which I resolve it through mentioned extension.It changed two files vendor/magento/module-catalog/Controller/Adminhtml/Product/Initialization/Helper.php and vendor/magento/module-catalog-url-rewrite/Observer/ProductUrlKeyAutogeneratorObserver.php.So that why I mentioned 2.1.x & 2.2.x in my answer.I am not sure about 2.3,let's try to compare the file,try this solution may be issue still exist in 2.3.So I presented the approach which I did.keep coding & hope for the best:) – Muhammad Hasham Mar 9 at 11:38
  • Can you send me your files please? – G. G. Mar 9 at 12:09
  • @G.G. Brother you should install extension and I don't make any changes in my magento 2.3 default functionality because I don't use this functionality use default value I recommend because it is tested solution for 2.1.x and 2.2.x. I want you to try this extension for your magento 2.3 if it's helpful and works then mark my answer correct so it's help others as well. keep coding :) thanks :) – Muhammad Hasham Mar 9 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.