Issue with multiple custom product details tabs not displaying The 2019 Stack Overflow Developer Survey Results Are InHow can i rewrite TierPrice Block in Magento2Magento2: How to rename the Details tab on the product details page, via overwriting layout file?Update block arguemnts in xml file (Recommended way not working)How to add CMS directive block on custom module field in Magento 2GENERATE THIS REPORT: main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_Magento 1.9. Need help with product nameHow to use session and pass some value to phtml file to phtml file?Magento 2.3.0 - Create Product Page H1 title with product name and attribute nameHow to rename the product detail tab title, and display as the last tab?MsrpPriceCalculator Exception
Why Did Howard Stark Use All The Vibranium They Had On A Prototype Shield?
Is flight data recorder erased after every flight?
Is there a name of the flying bionic bird?
Does duplicating a spell with wish count as casting that spell?
How to reverse every other sublist of a list?
Should I write numbers in words or as symbols in this case?
Why isn't airport relocation done gradually?
Can we apply L'Hospital's rule where the derivative is not continuous?
Is it possible for the two major parties in the UK to form a coalition with each other instead of a much smaller party?
Why do UK politicians seemingly ignore opinion polls on Brexit?
Why can Shazam do this?
Is three citations per paragraph excessive for undergraduate research paper?
Access elements in std::string where positon of string is greater than its size
How long do I have to send payment?
How was Skylab's orbit inclination chosen?
How can I create a character who can assume the widest possible range of creature sizes?
Patience, young "Padovan"
Poison Arrows Piercing damage reduced to 0, do you still get poisoned?
In microwave frequencies, do you use a circulator when you need a (near) perfect diode?
Why is the maximum length of openwrt’s root password 8 characters?
How to make payment on the internet without leaving a money trail?
Is this food a bread or a loaf?
Springs with some finite mass
How to manage monthly salary
Issue with multiple custom product details tabs not displaying
The 2019 Stack Overflow Developer Survey Results Are InHow can i rewrite TierPrice Block in Magento2Magento2: How to rename the Details tab on the product details page, via overwriting layout file?Update block arguemnts in xml file (Recommended way not working)How to add CMS directive block on custom module field in Magento 2GENERATE THIS REPORT: main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_Magento 1.9. Need help with product nameHow to use session and pass some value to phtml file to phtml file?Magento 2.3.0 - Create Product Page H1 title with product name and attribute nameHow to rename the product detail tab title, and display as the last tab?MsrpPriceCalculator Exception
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
In catalog_product_view.xml I have the following section:
<referenceBlock name="product.info.details">
<block class="MagentoFrameworkViewElementTemplate" template="Magento_Catalog::product/tabs/tab1.phtml" name="extra-tab-1" group="detailed_info">
<arguments>
<argument name="title" translate="true" xsi:type="string">Extra Tab 1</argument>
</arguments>
</block>
<block class="MagentoFrameworkViewElementTemplate" template="Magento_Catalog::product/tabs/tab2.phtml" name="extra-tab-2" group="detailed_info">
<arguments>
<argument name="title" translate="true" xsi:type="string">Extra Tab 2</argument>
</arguments>
</block>
</referenceBlock>
My issue is that only "Extra Tab 2" shows up on the product page. If I remove that block and clear caches, "Extra Tab 1" is then displayed.
I was hoping someone had experienced a similar issue and could point me towards a cause. There are no other custom modules or themes interfering with the product page layout.
magento2 product layout theme magento2.3
add a comment |
In catalog_product_view.xml I have the following section:
<referenceBlock name="product.info.details">
<block class="MagentoFrameworkViewElementTemplate" template="Magento_Catalog::product/tabs/tab1.phtml" name="extra-tab-1" group="detailed_info">
<arguments>
<argument name="title" translate="true" xsi:type="string">Extra Tab 1</argument>
</arguments>
</block>
<block class="MagentoFrameworkViewElementTemplate" template="Magento_Catalog::product/tabs/tab2.phtml" name="extra-tab-2" group="detailed_info">
<arguments>
<argument name="title" translate="true" xsi:type="string">Extra Tab 2</argument>
</arguments>
</block>
</referenceBlock>
My issue is that only "Extra Tab 2" shows up on the product page. If I remove that block and clear caches, "Extra Tab 1" is then displayed.
I was hoping someone had experienced a similar issue and could point me towards a cause. There are no other custom modules or themes interfering with the product page layout.
magento2 product layout theme magento2.3
Hello @Geat, I have tried your code and it is showing both tab.could you please share some more info ?
– Pawan
Apr 6 at 2:07
add a comment |
In catalog_product_view.xml I have the following section:
<referenceBlock name="product.info.details">
<block class="MagentoFrameworkViewElementTemplate" template="Magento_Catalog::product/tabs/tab1.phtml" name="extra-tab-1" group="detailed_info">
<arguments>
<argument name="title" translate="true" xsi:type="string">Extra Tab 1</argument>
</arguments>
</block>
<block class="MagentoFrameworkViewElementTemplate" template="Magento_Catalog::product/tabs/tab2.phtml" name="extra-tab-2" group="detailed_info">
<arguments>
<argument name="title" translate="true" xsi:type="string">Extra Tab 2</argument>
</arguments>
</block>
</referenceBlock>
My issue is that only "Extra Tab 2" shows up on the product page. If I remove that block and clear caches, "Extra Tab 1" is then displayed.
I was hoping someone had experienced a similar issue and could point me towards a cause. There are no other custom modules or themes interfering with the product page layout.
magento2 product layout theme magento2.3
In catalog_product_view.xml I have the following section:
<referenceBlock name="product.info.details">
<block class="MagentoFrameworkViewElementTemplate" template="Magento_Catalog::product/tabs/tab1.phtml" name="extra-tab-1" group="detailed_info">
<arguments>
<argument name="title" translate="true" xsi:type="string">Extra Tab 1</argument>
</arguments>
</block>
<block class="MagentoFrameworkViewElementTemplate" template="Magento_Catalog::product/tabs/tab2.phtml" name="extra-tab-2" group="detailed_info">
<arguments>
<argument name="title" translate="true" xsi:type="string">Extra Tab 2</argument>
</arguments>
</block>
</referenceBlock>
My issue is that only "Extra Tab 2" shows up on the product page. If I remove that block and clear caches, "Extra Tab 1" is then displayed.
I was hoping someone had experienced a similar issue and could point me towards a cause. There are no other custom modules or themes interfering with the product page layout.
magento2 product layout theme magento2.3
magento2 product layout theme magento2.3
asked Apr 5 at 20:50
GeatGeat
355217
355217
Hello @Geat, I have tried your code and it is showing both tab.could you please share some more info ?
– Pawan
Apr 6 at 2:07
add a comment |
Hello @Geat, I have tried your code and it is showing both tab.could you please share some more info ?
– Pawan
Apr 6 at 2:07
Hello @Geat, I have tried your code and it is showing both tab.could you please share some more info ?
– Pawan
Apr 6 at 2:07
Hello @Geat, I have tried your code and it is showing both tab.could you please share some more info ?
– Pawan
Apr 6 at 2:07
add a comment |
2 Answers
2
active
oldest
votes
Have you modified the details.phtml file? If not the only reason I've ever seen the tabs fail to render without any sort of syntax error is when there is no value returned by a tab. For instance if you use a custom attribute, like manufacturer_country in one of the tabs and $product->getManufacturerCountry() returns null or "".
Let's look at the file responsible for rendering the tabs vendor/magento/module-catalog/view/frontend/templates/product/view/details.phtml.
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
?>
<?php if ($detailedInfoGroup = $block->getGroupChildNames('detailed_info', 'getChildHtml')):?>
<div class="product info detailed">
<?php $layout = $block->getLayout(); ?>
<div class="product data items" data-mage-init='"tabs":"openedState":"active"'>
<?php foreach ($detailedInfoGroup as $name):?>
<?php
$html = $layout->renderElement($name);
if (!trim($html))
continue;
$alias = $layout->getElementAlias($name);
$label = $block->getChildData($alias, 'title');
?>
<div class="data item title"
aria-labeledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title"
data-role="collapsible" id="tab-label-<?= /* @escapeNotVerified */ $alias ?>">
<a class="data switch"
tabindex="-1"
data-toggle="switch"
href="#<?= /* @escapeNotVerified */ $alias ?>"
id="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title">
<?= /* @escapeNotVerified */ $label ?>
</a>
</div>
<div class="data item content" id="<?= /* @escapeNotVerified */ $alias ?>" data-role="content">
<?= /* @escapeNotVerified */ $html ?>
</div>
<?php endforeach;?>
</div>
</div>
<?php endif; ?>
These few lines below are what will decide if a tab is rendered or not:
$html = $layout->renderElement($name);
if (!trim($html))
continue;
So unless the value you're trying to return is empty or you've customized details.phtml then there is no reason for the tab not to be rendered.
As mentioned in the question, if I remove tab 2 then tab 1 is rendered, so it's an issue somnewhere outside of the tab rendering logic. For some reason, only one custom tab is ever rendered, it doesn't work if there's more than 1.
– Geat
yesterday
@Geat have you modified anything outside of the xml you posted?
– NSwanson7
yesterday
I haven't, and I also have very similar code working in a couple of other projects. The only difference is this site was a straight 2.3 install, the others were upgraded from 2.2 to 2.3. No idea if that makes a difference.
– Geat
yesterday
@Geat hmm, that's odd. I just checked the v2.3 version ofdetails.phtml, and it doesn't look to be any different. Let's try to debug this via process of elimination. Set both the tags to use the sametemplatefile. Lets see if you're still experiencing the issue.
– NSwanson7
yesterday
1
@Geat Just read your answer. Gotta hate logical errors they're the hardest to debug. You get no error to go off of. Good job figuring it out.
– NSwanson7
yesterday
|
show 2 more comments
I just stumbled across the answer.
As of Magento 2.3.1, if the tab does not have a sort order set, it uses 0. Unfortunately, Magento uses that sort order as the array key, so if multiple tabs do not have a sort order set, they overwrite the same array element and only the last tab is left. This issue is not present in 2.3.0.
The solution is to simply ensure that each tab has a sort order set, e.g.:
<argument name="sort_order" xsi:type="string">30</argument>
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268989%2fissue-with-multiple-custom-product-details-tabs-not-displaying%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Have you modified the details.phtml file? If not the only reason I've ever seen the tabs fail to render without any sort of syntax error is when there is no value returned by a tab. For instance if you use a custom attribute, like manufacturer_country in one of the tabs and $product->getManufacturerCountry() returns null or "".
Let's look at the file responsible for rendering the tabs vendor/magento/module-catalog/view/frontend/templates/product/view/details.phtml.
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
?>
<?php if ($detailedInfoGroup = $block->getGroupChildNames('detailed_info', 'getChildHtml')):?>
<div class="product info detailed">
<?php $layout = $block->getLayout(); ?>
<div class="product data items" data-mage-init='"tabs":"openedState":"active"'>
<?php foreach ($detailedInfoGroup as $name):?>
<?php
$html = $layout->renderElement($name);
if (!trim($html))
continue;
$alias = $layout->getElementAlias($name);
$label = $block->getChildData($alias, 'title');
?>
<div class="data item title"
aria-labeledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title"
data-role="collapsible" id="tab-label-<?= /* @escapeNotVerified */ $alias ?>">
<a class="data switch"
tabindex="-1"
data-toggle="switch"
href="#<?= /* @escapeNotVerified */ $alias ?>"
id="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title">
<?= /* @escapeNotVerified */ $label ?>
</a>
</div>
<div class="data item content" id="<?= /* @escapeNotVerified */ $alias ?>" data-role="content">
<?= /* @escapeNotVerified */ $html ?>
</div>
<?php endforeach;?>
</div>
</div>
<?php endif; ?>
These few lines below are what will decide if a tab is rendered or not:
$html = $layout->renderElement($name);
if (!trim($html))
continue;
So unless the value you're trying to return is empty or you've customized details.phtml then there is no reason for the tab not to be rendered.
As mentioned in the question, if I remove tab 2 then tab 1 is rendered, so it's an issue somnewhere outside of the tab rendering logic. For some reason, only one custom tab is ever rendered, it doesn't work if there's more than 1.
– Geat
yesterday
@Geat have you modified anything outside of the xml you posted?
– NSwanson7
yesterday
I haven't, and I also have very similar code working in a couple of other projects. The only difference is this site was a straight 2.3 install, the others were upgraded from 2.2 to 2.3. No idea if that makes a difference.
– Geat
yesterday
@Geat hmm, that's odd. I just checked the v2.3 version ofdetails.phtml, and it doesn't look to be any different. Let's try to debug this via process of elimination. Set both the tags to use the sametemplatefile. Lets see if you're still experiencing the issue.
– NSwanson7
yesterday
1
@Geat Just read your answer. Gotta hate logical errors they're the hardest to debug. You get no error to go off of. Good job figuring it out.
– NSwanson7
yesterday
|
show 2 more comments
Have you modified the details.phtml file? If not the only reason I've ever seen the tabs fail to render without any sort of syntax error is when there is no value returned by a tab. For instance if you use a custom attribute, like manufacturer_country in one of the tabs and $product->getManufacturerCountry() returns null or "".
Let's look at the file responsible for rendering the tabs vendor/magento/module-catalog/view/frontend/templates/product/view/details.phtml.
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
?>
<?php if ($detailedInfoGroup = $block->getGroupChildNames('detailed_info', 'getChildHtml')):?>
<div class="product info detailed">
<?php $layout = $block->getLayout(); ?>
<div class="product data items" data-mage-init='"tabs":"openedState":"active"'>
<?php foreach ($detailedInfoGroup as $name):?>
<?php
$html = $layout->renderElement($name);
if (!trim($html))
continue;
$alias = $layout->getElementAlias($name);
$label = $block->getChildData($alias, 'title');
?>
<div class="data item title"
aria-labeledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title"
data-role="collapsible" id="tab-label-<?= /* @escapeNotVerified */ $alias ?>">
<a class="data switch"
tabindex="-1"
data-toggle="switch"
href="#<?= /* @escapeNotVerified */ $alias ?>"
id="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title">
<?= /* @escapeNotVerified */ $label ?>
</a>
</div>
<div class="data item content" id="<?= /* @escapeNotVerified */ $alias ?>" data-role="content">
<?= /* @escapeNotVerified */ $html ?>
</div>
<?php endforeach;?>
</div>
</div>
<?php endif; ?>
These few lines below are what will decide if a tab is rendered or not:
$html = $layout->renderElement($name);
if (!trim($html))
continue;
So unless the value you're trying to return is empty or you've customized details.phtml then there is no reason for the tab not to be rendered.
As mentioned in the question, if I remove tab 2 then tab 1 is rendered, so it's an issue somnewhere outside of the tab rendering logic. For some reason, only one custom tab is ever rendered, it doesn't work if there's more than 1.
– Geat
yesterday
@Geat have you modified anything outside of the xml you posted?
– NSwanson7
yesterday
I haven't, and I also have very similar code working in a couple of other projects. The only difference is this site was a straight 2.3 install, the others were upgraded from 2.2 to 2.3. No idea if that makes a difference.
– Geat
yesterday
@Geat hmm, that's odd. I just checked the v2.3 version ofdetails.phtml, and it doesn't look to be any different. Let's try to debug this via process of elimination. Set both the tags to use the sametemplatefile. Lets see if you're still experiencing the issue.
– NSwanson7
yesterday
1
@Geat Just read your answer. Gotta hate logical errors they're the hardest to debug. You get no error to go off of. Good job figuring it out.
– NSwanson7
yesterday
|
show 2 more comments
Have you modified the details.phtml file? If not the only reason I've ever seen the tabs fail to render without any sort of syntax error is when there is no value returned by a tab. For instance if you use a custom attribute, like manufacturer_country in one of the tabs and $product->getManufacturerCountry() returns null or "".
Let's look at the file responsible for rendering the tabs vendor/magento/module-catalog/view/frontend/templates/product/view/details.phtml.
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
?>
<?php if ($detailedInfoGroup = $block->getGroupChildNames('detailed_info', 'getChildHtml')):?>
<div class="product info detailed">
<?php $layout = $block->getLayout(); ?>
<div class="product data items" data-mage-init='"tabs":"openedState":"active"'>
<?php foreach ($detailedInfoGroup as $name):?>
<?php
$html = $layout->renderElement($name);
if (!trim($html))
continue;
$alias = $layout->getElementAlias($name);
$label = $block->getChildData($alias, 'title');
?>
<div class="data item title"
aria-labeledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title"
data-role="collapsible" id="tab-label-<?= /* @escapeNotVerified */ $alias ?>">
<a class="data switch"
tabindex="-1"
data-toggle="switch"
href="#<?= /* @escapeNotVerified */ $alias ?>"
id="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title">
<?= /* @escapeNotVerified */ $label ?>
</a>
</div>
<div class="data item content" id="<?= /* @escapeNotVerified */ $alias ?>" data-role="content">
<?= /* @escapeNotVerified */ $html ?>
</div>
<?php endforeach;?>
</div>
</div>
<?php endif; ?>
These few lines below are what will decide if a tab is rendered or not:
$html = $layout->renderElement($name);
if (!trim($html))
continue;
So unless the value you're trying to return is empty or you've customized details.phtml then there is no reason for the tab not to be rendered.
Have you modified the details.phtml file? If not the only reason I've ever seen the tabs fail to render without any sort of syntax error is when there is no value returned by a tab. For instance if you use a custom attribute, like manufacturer_country in one of the tabs and $product->getManufacturerCountry() returns null or "".
Let's look at the file responsible for rendering the tabs vendor/magento/module-catalog/view/frontend/templates/product/view/details.phtml.
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
?>
<?php if ($detailedInfoGroup = $block->getGroupChildNames('detailed_info', 'getChildHtml')):?>
<div class="product info detailed">
<?php $layout = $block->getLayout(); ?>
<div class="product data items" data-mage-init='"tabs":"openedState":"active"'>
<?php foreach ($detailedInfoGroup as $name):?>
<?php
$html = $layout->renderElement($name);
if (!trim($html))
continue;
$alias = $layout->getElementAlias($name);
$label = $block->getChildData($alias, 'title');
?>
<div class="data item title"
aria-labeledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title"
data-role="collapsible" id="tab-label-<?= /* @escapeNotVerified */ $alias ?>">
<a class="data switch"
tabindex="-1"
data-toggle="switch"
href="#<?= /* @escapeNotVerified */ $alias ?>"
id="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title">
<?= /* @escapeNotVerified */ $label ?>
</a>
</div>
<div class="data item content" id="<?= /* @escapeNotVerified */ $alias ?>" data-role="content">
<?= /* @escapeNotVerified */ $html ?>
</div>
<?php endforeach;?>
</div>
</div>
<?php endif; ?>
These few lines below are what will decide if a tab is rendered or not:
$html = $layout->renderElement($name);
if (!trim($html))
continue;
So unless the value you're trying to return is empty or you've customized details.phtml then there is no reason for the tab not to be rendered.
answered Apr 6 at 18:10
NSwanson7NSwanson7
467
467
As mentioned in the question, if I remove tab 2 then tab 1 is rendered, so it's an issue somnewhere outside of the tab rendering logic. For some reason, only one custom tab is ever rendered, it doesn't work if there's more than 1.
– Geat
yesterday
@Geat have you modified anything outside of the xml you posted?
– NSwanson7
yesterday
I haven't, and I also have very similar code working in a couple of other projects. The only difference is this site was a straight 2.3 install, the others were upgraded from 2.2 to 2.3. No idea if that makes a difference.
– Geat
yesterday
@Geat hmm, that's odd. I just checked the v2.3 version ofdetails.phtml, and it doesn't look to be any different. Let's try to debug this via process of elimination. Set both the tags to use the sametemplatefile. Lets see if you're still experiencing the issue.
– NSwanson7
yesterday
1
@Geat Just read your answer. Gotta hate logical errors they're the hardest to debug. You get no error to go off of. Good job figuring it out.
– NSwanson7
yesterday
|
show 2 more comments
As mentioned in the question, if I remove tab 2 then tab 1 is rendered, so it's an issue somnewhere outside of the tab rendering logic. For some reason, only one custom tab is ever rendered, it doesn't work if there's more than 1.
– Geat
yesterday
@Geat have you modified anything outside of the xml you posted?
– NSwanson7
yesterday
I haven't, and I also have very similar code working in a couple of other projects. The only difference is this site was a straight 2.3 install, the others were upgraded from 2.2 to 2.3. No idea if that makes a difference.
– Geat
yesterday
@Geat hmm, that's odd. I just checked the v2.3 version ofdetails.phtml, and it doesn't look to be any different. Let's try to debug this via process of elimination. Set both the tags to use the sametemplatefile. Lets see if you're still experiencing the issue.
– NSwanson7
yesterday
1
@Geat Just read your answer. Gotta hate logical errors they're the hardest to debug. You get no error to go off of. Good job figuring it out.
– NSwanson7
yesterday
As mentioned in the question, if I remove tab 2 then tab 1 is rendered, so it's an issue somnewhere outside of the tab rendering logic. For some reason, only one custom tab is ever rendered, it doesn't work if there's more than 1.
– Geat
yesterday
As mentioned in the question, if I remove tab 2 then tab 1 is rendered, so it's an issue somnewhere outside of the tab rendering logic. For some reason, only one custom tab is ever rendered, it doesn't work if there's more than 1.
– Geat
yesterday
@Geat have you modified anything outside of the xml you posted?
– NSwanson7
yesterday
@Geat have you modified anything outside of the xml you posted?
– NSwanson7
yesterday
I haven't, and I also have very similar code working in a couple of other projects. The only difference is this site was a straight 2.3 install, the others were upgraded from 2.2 to 2.3. No idea if that makes a difference.
– Geat
yesterday
I haven't, and I also have very similar code working in a couple of other projects. The only difference is this site was a straight 2.3 install, the others were upgraded from 2.2 to 2.3. No idea if that makes a difference.
– Geat
yesterday
@Geat hmm, that's odd. I just checked the v2.3 version of
details.phtml, and it doesn't look to be any different. Let's try to debug this via process of elimination. Set both the tags to use the same template file. Lets see if you're still experiencing the issue.– NSwanson7
yesterday
@Geat hmm, that's odd. I just checked the v2.3 version of
details.phtml, and it doesn't look to be any different. Let's try to debug this via process of elimination. Set both the tags to use the same template file. Lets see if you're still experiencing the issue.– NSwanson7
yesterday
1
1
@Geat Just read your answer. Gotta hate logical errors they're the hardest to debug. You get no error to go off of. Good job figuring it out.
– NSwanson7
yesterday
@Geat Just read your answer. Gotta hate logical errors they're the hardest to debug. You get no error to go off of. Good job figuring it out.
– NSwanson7
yesterday
|
show 2 more comments
I just stumbled across the answer.
As of Magento 2.3.1, if the tab does not have a sort order set, it uses 0. Unfortunately, Magento uses that sort order as the array key, so if multiple tabs do not have a sort order set, they overwrite the same array element and only the last tab is left. This issue is not present in 2.3.0.
The solution is to simply ensure that each tab has a sort order set, e.g.:
<argument name="sort_order" xsi:type="string">30</argument>
add a comment |
I just stumbled across the answer.
As of Magento 2.3.1, if the tab does not have a sort order set, it uses 0. Unfortunately, Magento uses that sort order as the array key, so if multiple tabs do not have a sort order set, they overwrite the same array element and only the last tab is left. This issue is not present in 2.3.0.
The solution is to simply ensure that each tab has a sort order set, e.g.:
<argument name="sort_order" xsi:type="string">30</argument>
add a comment |
I just stumbled across the answer.
As of Magento 2.3.1, if the tab does not have a sort order set, it uses 0. Unfortunately, Magento uses that sort order as the array key, so if multiple tabs do not have a sort order set, they overwrite the same array element and only the last tab is left. This issue is not present in 2.3.0.
The solution is to simply ensure that each tab has a sort order set, e.g.:
<argument name="sort_order" xsi:type="string">30</argument>
I just stumbled across the answer.
As of Magento 2.3.1, if the tab does not have a sort order set, it uses 0. Unfortunately, Magento uses that sort order as the array key, so if multiple tabs do not have a sort order set, they overwrite the same array element and only the last tab is left. This issue is not present in 2.3.0.
The solution is to simply ensure that each tab has a sort order set, e.g.:
<argument name="sort_order" xsi:type="string">30</argument>
edited yesterday
answered yesterday
GeatGeat
355217
355217
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268989%2fissue-with-multiple-custom-product-details-tabs-not-displaying%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hello @Geat, I have tried your code and it is showing both tab.could you please share some more info ?
– Pawan
Apr 6 at 2:07