Pregunta

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

¿Fue útil?

Solución

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."

Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange
scroll top