2

We've faced this issue when we've upgraded Magento Commerce 2.3.2 to 2.3.4.

Error was like:

Fatal error: Uncaught Error: Call to a member function getSectionNames() on /vendor/magento/module-customer/view/frontend/templates/js/section-config.phtml:20

1 Answer 1

19

We found the solution here: https://github.com/magento/magento2/issues/26647

We've overridden the vendor/magento/module-customer/view/frontend/layout/default.xml in our custom theme. So, changing its structure during the upgrade caused the issue. Ours was missing the "sectionNamesProvider" argument tag for customer.section.config block.

<block name="customer.section.config" class="Magento\Customer\Block\SectionConfig"
               template="Magento_Customer::js/section-config.phtml">
            <arguments>
                <argument name="sectionNamesProvider" xsi:type="object">Magento\Customer\Block\SectionNamesProvider</argument>
            </arguments>
        </block>

We couldn't predict this. As Magento guys said, this is an issue that needs to be solved.

"Stuff like this happens very frequently in "patch" releases. We should somehow try to avoid this."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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