Magento2: Multiple custom tabs on product detail page does not work since Magento 2.3.1

Created on 31 Mar 2019  路  7Comments  路  Source: magento/magento2

I use three custom tabs on the product page since Magento 2.1.
They are defined in a catalog_module_view.xml in my own module. That works fine with 2.3.0, but after update to 2.3.1 only the last defined tab is shown. The two before are ignored. Also the after attribute is ignored. The tab is always the first.

Preconditions (*)

  1. Install Magento 2.3.1
  2. Create a custom module
  3. Define three custom tabs in catalog_module_view.xml like this:
    `






    Ingredients




    Nutrion Information




    Information for allergic persons




`

Steps to reproduce (*)

Show product detail page

Expected result (*)

Magento 2.3.0 shows the Tabs correctly:
custom tab with magento 2 3 0

Actual result (*)

Magento 2.3.1 shows only the last defined tab at the first position:
custom tab with magento 2 3 1

Format is valid

Most helpful comment

You need to add the new argument in your catalog_module_view.xml for each custom tab.

<argument name="sort_order" xsi:type="string">2</argument>

All 7 comments

Hi @nobodyMO. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@nobodyMO do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

@magento-engcom-team give me 2.3.1 instance

Hi @nobodyMO. Thank you for your request. I'm working on Magento 2.3.1 instance for you

You need to add the new argument in your catalog_module_view.xml for each custom tab.

<argument name="sort_order" xsi:type="string">2</argument>

hi @ernesthernandez,
thank you very much for the tip.
With the additional attribute entries the display now works again.
@magento
It would have been nice if this had been described more clearly in the release notes.

Just encountered this issue and while the comment from @ernesthernandez fixes the problem for the site I am developing, I wonder if there should now be a way of calculating how many tabs there are. What if we install a third party extension and they do not know we have custom tabs on the site? It appears that this will just overwrite the custom tab if the same sort_order value is set.

I did the test:
TEST1
tab 'description' sort order 10
tab 'more information' sort order 40
tab 'custom1' sort order 30
tab 'custom2' sort order 40

the last tab overrides the previous tab.
result: tab 'description' / tab 'cutom1' / tab 'custom2'

TEST2
tab 'description' sort order 10
tab 'more information' sort order 10
tab 'custom1' sort order 10
tab 'custom2' sort order 10

the last tab overrides the previous tabs.
result is only: tab 'custom2'

Was this page helpful?
0 / 5 - 0 ratings