cancel
Showing results for 
Search instead for 
Did you mean: 

Layout - container disappear

Layout - container disappear

Hi,

 

for some container i have strange behaviour

 

 

<referenceContainer name="porto_header" after="store_language">
                   <block class="Vendor\Module\Block\RedirectionBlock" 
                   name="redirectionblock" 
                   template="Vendor_Module::block.phtml" />
</referenceContainer>

This code causes that instead of adding my block to "porto_header" whole block "porto_header" disappear. What can be reason for this? 

 

 

 

1 REPLY 1

Re: Layout - container disappear

Hi @bajgproton0731 ,

 

First check your log entries if there is any error mentioned in [Magento_Root]/var/log/exception.log

 

Can you please try some troubleshooting steps to check exact issue. 

 

1. First try to replace block code with below code to check 

<block class="Magento\Framework\View\Element\Template" name="redirectionblock" template="Vendor_Module::block.phtml" />

try to add a single line of code in your phtml file and flush cache. Check still you face container disappear issue or not.

 

2. If issue not occurring then try to replace block class name with your class. And check the issue again,

 

Thanks!

Problem solved? Click Accept as Solution!