We’re rewarding the question askers & reputations are being recalculated! Read more.
2 added 385 characters in body
source | link

I am facing the error in Magento Localhost which is

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file /var/www/html/magento/app/code/Mb/Customizations/etc/frontend/events.xml: Element 'event', attribute 'cachable': The attribute 'cachable' is not allowed. Line: 9

In the image you can see the error enter image description here

So after That I tried to remove cacheable from the core class magento/app/code/Mb/Customizations/etc/frontend/events.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

    <event name="layout_generate_blocks_after">
        <observer name="cust_productCanonical" instance="Mb\Customizations\Observer\ProductCanonical"/>
    </event>

    <event name="controller_action_predispatch_checkout_index_index" cachable="false">
        <observer name="checkcout_page_pre" instance="Mb\Customizations\Observer\Preloadtab" />
    </event>
    <event name="controller_action_postdispatch_checkout_index_index" cachable="false">
        <observer name="checkcout_page_post" instance="Mb\Customizations\Observer\Loadtab" />
    </event>

</config>

but after removing the casheable from the above xml file it gives me some else error

1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file /var/www/html/magento/app/code/TM/Crm/etc/frontend/events.xml: Element 'config': Missing child element(s). Expected is ( event ). Line: 2

enter image description here

magento/app/code/TM/Crm/etc/frontend/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

<!--     <event name="checkout_onepage_controller_success_action">
        <observer name="tm_crm_checkout_onepage_controller_success_action" instance="TM\Crm\Observer\Crm" />
    </event> -->

</config>

So how can I remove this error and what is the problem in the above xml file. Thanks

I am facing the error in Magento Localhost which is

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file /var/www/html/magento/app/code/Mb/Customizations/etc/frontend/events.xml: Element 'event', attribute 'cachable': The attribute 'cachable' is not allowed. Line: 9

In the image you can see the error enter image description here

So after That I tried to remove cacheable from the core class magento/app/code/Mb/Customizations/etc/frontend/events.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

    <event name="layout_generate_blocks_after">
        <observer name="cust_productCanonical" instance="Mb\Customizations\Observer\ProductCanonical"/>
    </event>

    <event name="controller_action_predispatch_checkout_index_index" cachable="false">
        <observer name="checkcout_page_pre" instance="Mb\Customizations\Observer\Preloadtab" />
    </event>
    <event name="controller_action_postdispatch_checkout_index_index" cachable="false">
        <observer name="checkcout_page_post" instance="Mb\Customizations\Observer\Loadtab" />
    </event>

</config>

but after removing the casheable from the above xml file it gives me some else error

1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file /var/www/html/magento/app/code/TM/Crm/etc/frontend/events.xml: Element 'config': Missing child element(s). Expected is ( event ). Line: 2

enter image description here

So how can I remove this error and what is the problem in the above xml file. Thanks

I am facing the error in Magento Localhost which is

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file /var/www/html/magento/app/code/Mb/Customizations/etc/frontend/events.xml: Element 'event', attribute 'cachable': The attribute 'cachable' is not allowed. Line: 9

In the image you can see the error enter image description here

So after That I tried to remove cacheable from the core class magento/app/code/Mb/Customizations/etc/frontend/events.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

    <event name="layout_generate_blocks_after">
        <observer name="cust_productCanonical" instance="Mb\Customizations\Observer\ProductCanonical"/>
    </event>

    <event name="controller_action_predispatch_checkout_index_index" cachable="false">
        <observer name="checkcout_page_pre" instance="Mb\Customizations\Observer\Preloadtab" />
    </event>
    <event name="controller_action_postdispatch_checkout_index_index" cachable="false">
        <observer name="checkcout_page_post" instance="Mb\Customizations\Observer\Loadtab" />
    </event>

</config>

but after removing the casheable from the above xml file it gives me some else error

1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file /var/www/html/magento/app/code/TM/Crm/etc/frontend/events.xml: Element 'config': Missing child element(s). Expected is ( event ). Line: 2

enter image description here

magento/app/code/TM/Crm/etc/frontend/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

<!--     <event name="checkout_onepage_controller_success_action">
        <observer name="tm_crm_checkout_onepage_controller_success_action" instance="TM\Crm\Observer\Crm" />
    </event> -->

</config>

So how can I remove this error and what is the problem in the above xml file. Thanks

1
source | link

The attribute 'cachable' is not allowed. Magento 2

I am facing the error in Magento Localhost which is

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file /var/www/html/magento/app/code/Mb/Customizations/etc/frontend/events.xml: Element 'event', attribute 'cachable': The attribute 'cachable' is not allowed. Line: 9

In the image you can see the error enter image description here

So after That I tried to remove cacheable from the core class magento/app/code/Mb/Customizations/etc/frontend/events.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

    <event name="layout_generate_blocks_after">
        <observer name="cust_productCanonical" instance="Mb\Customizations\Observer\ProductCanonical"/>
    </event>

    <event name="controller_action_predispatch_checkout_index_index" cachable="false">
        <observer name="checkcout_page_pre" instance="Mb\Customizations\Observer\Preloadtab" />
    </event>
    <event name="controller_action_postdispatch_checkout_index_index" cachable="false">
        <observer name="checkcout_page_post" instance="Mb\Customizations\Observer\Loadtab" />
    </event>

</config>

but after removing the casheable from the above xml file it gives me some else error

1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file /var/www/html/magento/app/code/TM/Crm/etc/frontend/events.xml: Element 'config': Missing child element(s). Expected is ( event ). Line: 2

enter image description here

So how can I remove this error and what is the problem in the above xml file. Thanks