Unbelievable,
every version introduces new bugs.
I am not happy currently.
Updated from WORKING 2.3.3 Version to 2.3.4
Now having blank frontend output.
What is this?
Thanks for opening this issue!
Hi @chequille. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
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 give me 2.4-develop instance - upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
@chequille do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Makes no sense to test with vanilla, because it seems that the problem is in my own theme, but no idea what changed regarding own themes.
Any idea how I can find whats wrong now?
Getting no errors, makes it more difficult to find.
New information:
when looking at the source code of the blank page, I find the following:
<script type="text/x-magento-init">
{
"*": {
"Magento_Customer/js/section-config": {
"sections": {"stores\/store\/switch":"*","stores\/store\/switchrequest":"*","directory\/currency\/switch":"*","*":["messages"],"customer\/account\/logout":["recently_viewed_product","recently_compared_product","persistent"],"customer\/account\/loginpost":"*","customer\/account\/createpost":"*","customer\/account\/editpost":"*","customer\/ajax\/login":["checkout-data","cart","captcha"],"catalog\/product_compare\/add":["compare-products"],"catalog\/product_compare\/remove":["compare-products"],"catalog\/product_compare\/clear":["compare-products"],"sales\/guest\/reorder":["cart"],"sales\/order\/reorder":["cart"],"checkout\/cart\/add":["cart","directory-data"],"checkout\/cart\/delete":["cart"],"checkout\/cart\/updatepost":["cart"],"checkout\/cart\/updateitemoptions":["cart"],"checkout\/cart\/couponpost":["cart"],"checkout\/cart\/estimatepost":["cart"],"checkout\/cart\/estimateupdatepost":["cart"],"checkout\/onepage\/saveorder":["cart","checkout-data","last-ordered-items","checkout-fields"],"checkout\/sidebar\/removeitem":["cart"],"checkout\/sidebar\/updateitemqty":["cart"],"rest\/*\/v1\/carts\/*\/payment-information":["cart","last-ordered-items","instant-purchase"],"rest\/*\/v1\/guest-carts\/*\/payment-information":["cart"],"rest\/*\/v1\/guest-carts\/*\/selected-payment-method":["cart","checkout-data"],"rest\/*\/v1\/carts\/*\/selected-payment-method":["cart","checkout-data","instant-purchase"],"customer\/address\/*":["instant-purchase"],"customer\/account\/*":["instant-purchase"],"vault\/cards\/deleteaction":["instant-purchase"],"multishipping\/checkout\/overviewpost":["cart"],"authorizenet\/directpost_payment\/place":["cart","checkout-data"],"paypal\/express\/placeorder":["cart","checkout-data"],"paypal\/payflowexpress\/placeorder":["cart","checkout-data"],"paypal\/express\/onauthorization":["cart","checkout-data"],"persistent\/index\/unsetcookie":["persistent"],"review\/product\/post":["review"],"braintree\/paypal\/placeorder":["cart","checkout-data"],"wishlist\/index\/add":["wishlist"],"wishlist\/index\/remove":["wishlist"],"wishlist\/index\/updateitemoptions":["wishlist"],"wishlist\/index\/update":["wishlist"],"wishlist\/index\/cart":["wishlist","cart"],"wishlist\/index\/fromcart":["wishlist","cart"],"wishlist\/index\/allcart":["wishlist","cart"],"wishlist\/shared\/allcart":["wishlist","cart"],"wishlist\/shared\/cart":["cart"],"rest\/*\/v1\/*\/*\/dhl-services\/save-services":["cart"]},
"clientSideSections": ["checkout-data","cart-data","chatData"],
"baseUrls": ["https:\/\/magento.hopfenexpress.de\/"],
"sectionNames": <br />
<b>Fatal error</b>: Uncaught Error: Call to a member function getSectionNames() on null in /var/www/vhosts/hopfenmuseum-tettnang.de/magento.hopfenexpress.de/vendor/magento/module-customer/view/frontend/templates/js/section-config.phtml:20
Stack trace:
#0 /var/www/vhosts/hopfenmuseum-tettnang.de/magento.hopfenexpress.de/vendor/magento/framework/View/TemplateEngine/Php.php(59): include()
#1 /var/www/vhosts/hopfenmuseum-tettnang.de/magento.hopfenexpress.de/vendor/magento/framework/View/Element/Template.php(271): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Customer\Block\SectionConfig), '/var/www/vhosts...', Array)
#2 /var/www/vhosts/hopfenmuseum-tettnang.de/magento.hopfenexpress.de/vendor/magento/framework/View/Element/Template.php(301): Magento\Framework\View\Element\Template->fetchView('/var/www/vhosts...')
#3 /var/www/vhosts/hopfenmuseum-tettnang.de/magento.hopfenexpress.de/vendor/magento/framework/View/Element/AbstractBlock.php(1099): Magento\Framework\View\Element\Template->_toHtml()
#4 /var/www/vhosts/hop in <b>/var/www/vhosts/hopfenmuseum-tettnang.de/magento.hopfenexpress.de/vendor/magento/module-customer/view/frontend/templates/js/section-config.phtml</b> on line <b>20</b><br />
Ok, reverted back to 2.3.3 and everything is working.
Hopefully somebody will answer to this and have a solution for this problem.
Got it !
In module_customer default.xml, there was a change in the block customer.section.config
There is now a argument name="sectionNamesProvider".
This argument was missed in my layout file. This causes the error when trying to call getSectionNames().
Good that you found a solution @chequille
Issue was introduced by https://github.com/magento/magento2/commit/d6ef3ef017dc33c12d489c3e2923d3c2f3c4d6de#diff-9befd0fa1a9fa40bd79ea89372d51c98R19-R20
The template assumes an argument sectionNamesProvider always exists in every single instance of that particular block.
@maghamed & @nathanjosiah: this is another example of the thing we talked about last on Slack. I'm just pointing this out to you guys. Stuff like this happens very frequently in "patch" releases. We should somehow try to avoid this.
Issue caused by recreating the name="customer.section.config" block within my custom theme but due to the new argument introduced in the above commit this required this is the main cause for the issue and simply removing the block from my theme or including the argument fixes the issue.
Hi Folks ,
Can you let me know how to solve this??
in app/design/frontend/Custom/theme/Magento_Customer/layout/default.xml.
But same error.
Most helpful comment
Got it !
In module_customer default.xml, there was a change in the block customer.section.config
There is now a argument name="sectionNamesProvider".
This argument was missed in my layout file. This causes the error when trying to call getSectionNames().