The attribute 'cachable' is not allowed. Magento 2Server error 500 after installWhat's your way of debugging xml related exceptions?Invalid XML - Element 'config': Missing child element(s)?Magento Module creation gives errorMagento 2 - Can't access to products with direct urlMagento 2 : Can a single UI Component node have more than one collection?Magento 2.2.0 Error : Element 'referenceContainer', attribute 'after': The attribute 'after' is not allowedadmin grid not workingMagento 2 Create new “Catalog Input Type for Store Owner” AttributeMagento2 + UI component xml file stop working as mode of deployment change
Certain search in list
Zeros of the Hadamard product of holomorphic functions
Overlapping String-Blocks
A IP can traceroute to it, but can not ping
Alternate way of computing the probability of being dealt a 13 card hand with 3 kings given that you have been dealt 2 kings
What is the actual quality of machine translations?
Importance of Building Credit Score?
How to handle self harm scars on the arm in work environment?
Is it legal for a bar bouncer to confiscate a fake ID
Is it expected that a reader will skip parts of what you write?
Is a lack of character descriptions a problem?
Wooden cooking layout
Cascading Switches. Will it affect performance?
Giant Steps - Coltrane and Slonimsky
How to hide rifle during medieval town entrance inspection?
Medieval flying castle propulsion
Pre-1972 sci-fi short story or novel: alien(?) tunnel where people try new moves and get destroyed if they're not the correct ones
Shell script returning "Running: command not found". Not sure why
Why would future John risk sending back a T-800 to save his younger self?
Union with anonymous struct with flexible array member
Need feedback - Can the composition/colors of this design be fixed if something is lacking or is not a better fit?
How to manually rewind film?
How to communicate to my GM that not being allowed to use stealth isn't fun for me?
Does a scale have more than seven chords?
The attribute 'cachable' is not allowed. Magento 2
Server error 500 after installWhat's your way of debugging xml related exceptions?Invalid XML - Element 'config': Missing child element(s)?Magento Module creation gives errorMagento 2 - Can't access to products with direct urlMagento 2 : Can a single UI Component node have more than one collection?Magento 2.2.0 Error : Element 'referenceContainer', attribute 'after': The attribute 'after' is not allowedadmin grid not workingMagento 2 Create new “Catalog Input Type for Store Owner” AttributeMagento2 + UI component xml file stop working as mode of deployment change
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am facing the error in Magento Localhost which is
Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
So after That I tried to remove cacheable from the core classmagento/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="MbCustomizationsObserverProductCanonical"/>
</event>
<event name="controller_action_predispatch_checkout_index_index" cachable="false">
<observer name="checkcout_page_pre" instance="MbCustomizationsObserverPreloadtab" />
</event>
<event name="controller_action_postdispatch_checkout_index_index" cachable="false">
<observer name="checkcout_page_post" instance="MbCustomizationsObserverLoadtab" />
</event>
</config>
but after removing the casheable
from the above xml
file it gives me some else error
1 exception(s):
Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
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="TMCrmObserverCrm" />
</event> -->
</config>
So how can I remove this error and what is the problem in the above xml
file. Thanks
magento2 installation localhost
|
show 4 more comments
I am facing the error in Magento Localhost which is
Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
So after That I tried to remove cacheable from the core classmagento/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="MbCustomizationsObserverProductCanonical"/>
</event>
<event name="controller_action_predispatch_checkout_index_index" cachable="false">
<observer name="checkcout_page_pre" instance="MbCustomizationsObserverPreloadtab" />
</event>
<event name="controller_action_postdispatch_checkout_index_index" cachable="false">
<observer name="checkcout_page_post" instance="MbCustomizationsObserverLoadtab" />
</event>
</config>
but after removing the casheable
from the above xml
file it gives me some else error
1 exception(s):
Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
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="TMCrmObserverCrm" />
</event> -->
</config>
So how can I remove this error and what is the problem in the above xml
file. Thanks
magento2 installation localhost
cachable="false"
should only be used for blocks not for events. here is the full docs from magento devdocs.magento.com/guides/v2.2/extension-dev-guide/cache/…
– Aman Alam
May 31 at 6:00
ok fine but when I remove thecachable
then it give me another error1 exception(s): Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
– Asad Khan
May 31 at 6:02
Cachable? Cashable? Cacheable? Man, that typo variations can kill you :) My bet is you may have some white space in that XML between config and event after cleaning the wrong references
– Raul Sanchez
May 31 at 6:02
Please post your XML?magento/app/code/TM/Crm/etc/frontend/events.xml
– Khoa TruongDinh
May 31 at 6:05
@KhoaTruongDinh Sir question updated kindly check it
– Asad Khan
May 31 at 6:11
|
show 4 more comments
I am facing the error in Magento Localhost which is
Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
So after That I tried to remove cacheable from the core classmagento/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="MbCustomizationsObserverProductCanonical"/>
</event>
<event name="controller_action_predispatch_checkout_index_index" cachable="false">
<observer name="checkcout_page_pre" instance="MbCustomizationsObserverPreloadtab" />
</event>
<event name="controller_action_postdispatch_checkout_index_index" cachable="false">
<observer name="checkcout_page_post" instance="MbCustomizationsObserverLoadtab" />
</event>
</config>
but after removing the casheable
from the above xml
file it gives me some else error
1 exception(s):
Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
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="TMCrmObserverCrm" />
</event> -->
</config>
So how can I remove this error and what is the problem in the above xml
file. Thanks
magento2 installation localhost
I am facing the error in Magento Localhost which is
Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
So after That I tried to remove cacheable from the core classmagento/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="MbCustomizationsObserverProductCanonical"/>
</event>
<event name="controller_action_predispatch_checkout_index_index" cachable="false">
<observer name="checkcout_page_pre" instance="MbCustomizationsObserverPreloadtab" />
</event>
<event name="controller_action_postdispatch_checkout_index_index" cachable="false">
<observer name="checkcout_page_post" instance="MbCustomizationsObserverLoadtab" />
</event>
</config>
but after removing the casheable
from the above xml
file it gives me some else error
1 exception(s):
Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
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="TMCrmObserverCrm" />
</event> -->
</config>
So how can I remove this error and what is the problem in the above xml
file. Thanks
magento2 installation localhost
magento2 installation localhost
edited May 31 at 6:10
Asad Khan
asked May 31 at 5:51
Asad KhanAsad Khan
50814
50814
cachable="false"
should only be used for blocks not for events. here is the full docs from magento devdocs.magento.com/guides/v2.2/extension-dev-guide/cache/…
– Aman Alam
May 31 at 6:00
ok fine but when I remove thecachable
then it give me another error1 exception(s): Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
– Asad Khan
May 31 at 6:02
Cachable? Cashable? Cacheable? Man, that typo variations can kill you :) My bet is you may have some white space in that XML between config and event after cleaning the wrong references
– Raul Sanchez
May 31 at 6:02
Please post your XML?magento/app/code/TM/Crm/etc/frontend/events.xml
– Khoa TruongDinh
May 31 at 6:05
@KhoaTruongDinh Sir question updated kindly check it
– Asad Khan
May 31 at 6:11
|
show 4 more comments
cachable="false"
should only be used for blocks not for events. here is the full docs from magento devdocs.magento.com/guides/v2.2/extension-dev-guide/cache/…
– Aman Alam
May 31 at 6:00
ok fine but when I remove thecachable
then it give me another error1 exception(s): Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
– Asad Khan
May 31 at 6:02
Cachable? Cashable? Cacheable? Man, that typo variations can kill you :) My bet is you may have some white space in that XML between config and event after cleaning the wrong references
– Raul Sanchez
May 31 at 6:02
Please post your XML?magento/app/code/TM/Crm/etc/frontend/events.xml
– Khoa TruongDinh
May 31 at 6:05
@KhoaTruongDinh Sir question updated kindly check it
– Asad Khan
May 31 at 6:11
cachable="false"
should only be used for blocks not for events. here is the full docs from magento devdocs.magento.com/guides/v2.2/extension-dev-guide/cache/…– Aman Alam
May 31 at 6:00
cachable="false"
should only be used for blocks not for events. here is the full docs from magento devdocs.magento.com/guides/v2.2/extension-dev-guide/cache/…– Aman Alam
May 31 at 6:00
ok fine but when I remove the
cachable
then it give me another error 1 exception(s): Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
– Asad Khan
May 31 at 6:02
ok fine but when I remove the
cachable
then it give me another error 1 exception(s): Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
– Asad Khan
May 31 at 6:02
Cachable? Cashable? Cacheable? Man, that typo variations can kill you :) My bet is you may have some white space in that XML between config and event after cleaning the wrong references
– Raul Sanchez
May 31 at 6:02
Cachable? Cashable? Cacheable? Man, that typo variations can kill you :) My bet is you may have some white space in that XML between config and event after cleaning the wrong references
– Raul Sanchez
May 31 at 6:02
Please post your XML?
magento/app/code/TM/Crm/etc/frontend/events.xml
– Khoa TruongDinh
May 31 at 6:05
Please post your XML?
magento/app/code/TM/Crm/etc/frontend/events.xml
– Khoa TruongDinh
May 31 at 6:05
@KhoaTruongDinh Sir question updated kindly check it
– Asad Khan
May 31 at 6:11
@KhoaTruongDinh Sir question updated kindly check it
– Asad Khan
May 31 at 6:11
|
show 4 more comments
2 Answers
2
active
oldest
votes
Just make the xml look like this:
<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="MbCustomizationsObserverProductCanonical"/>
</event>
<event name="controller_action_predispatch_checkout_index_index">
<observer name="checkcout_page_pre" instance="MbCustomizationsObserverPreloadtab" />
</event>
<event name="controller_action_postdispatch_checkout_index_index">
<observer name="checkcout_page_post" instance="MbCustomizationsObserverLoadtab" />
</event>
</config>
If you don't have any event tags in your file, remove the file completely. You cannot have an empty file.
Sir I tried this but it gives me an errorException #0 (MagentoFrameworkExceptionLocalizedException): 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 )
– Asad Khan
May 31 at 6:18
Please clear cache after changes suggested by Marius .
– padhiyar gaurang
May 31 at 6:24
add a comment |
<?xml version="1.0" encoding="UTF-8"?>
<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="MbCustomizationsObserverProductCanonical"/>
</event>
</config>
Make sure your XML is UTF-8 formatted, Then do cache flush and try it.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f276808%2fthe-attribute-cachable-is-not-allowed-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Just make the xml look like this:
<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="MbCustomizationsObserverProductCanonical"/>
</event>
<event name="controller_action_predispatch_checkout_index_index">
<observer name="checkcout_page_pre" instance="MbCustomizationsObserverPreloadtab" />
</event>
<event name="controller_action_postdispatch_checkout_index_index">
<observer name="checkcout_page_post" instance="MbCustomizationsObserverLoadtab" />
</event>
</config>
If you don't have any event tags in your file, remove the file completely. You cannot have an empty file.
Sir I tried this but it gives me an errorException #0 (MagentoFrameworkExceptionLocalizedException): 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 )
– Asad Khan
May 31 at 6:18
Please clear cache after changes suggested by Marius .
– padhiyar gaurang
May 31 at 6:24
add a comment |
Just make the xml look like this:
<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="MbCustomizationsObserverProductCanonical"/>
</event>
<event name="controller_action_predispatch_checkout_index_index">
<observer name="checkcout_page_pre" instance="MbCustomizationsObserverPreloadtab" />
</event>
<event name="controller_action_postdispatch_checkout_index_index">
<observer name="checkcout_page_post" instance="MbCustomizationsObserverLoadtab" />
</event>
</config>
If you don't have any event tags in your file, remove the file completely. You cannot have an empty file.
Sir I tried this but it gives me an errorException #0 (MagentoFrameworkExceptionLocalizedException): 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 )
– Asad Khan
May 31 at 6:18
Please clear cache after changes suggested by Marius .
– padhiyar gaurang
May 31 at 6:24
add a comment |
Just make the xml look like this:
<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="MbCustomizationsObserverProductCanonical"/>
</event>
<event name="controller_action_predispatch_checkout_index_index">
<observer name="checkcout_page_pre" instance="MbCustomizationsObserverPreloadtab" />
</event>
<event name="controller_action_postdispatch_checkout_index_index">
<observer name="checkcout_page_post" instance="MbCustomizationsObserverLoadtab" />
</event>
</config>
If you don't have any event tags in your file, remove the file completely. You cannot have an empty file.
Just make the xml look like this:
<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="MbCustomizationsObserverProductCanonical"/>
</event>
<event name="controller_action_predispatch_checkout_index_index">
<observer name="checkcout_page_pre" instance="MbCustomizationsObserverPreloadtab" />
</event>
<event name="controller_action_postdispatch_checkout_index_index">
<observer name="checkcout_page_post" instance="MbCustomizationsObserverLoadtab" />
</event>
</config>
If you don't have any event tags in your file, remove the file completely. You cannot have an empty file.
answered May 31 at 6:13
Marius♦Marius
169k28329702
169k28329702
Sir I tried this but it gives me an errorException #0 (MagentoFrameworkExceptionLocalizedException): 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 )
– Asad Khan
May 31 at 6:18
Please clear cache after changes suggested by Marius .
– padhiyar gaurang
May 31 at 6:24
add a comment |
Sir I tried this but it gives me an errorException #0 (MagentoFrameworkExceptionLocalizedException): 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 )
– Asad Khan
May 31 at 6:18
Please clear cache after changes suggested by Marius .
– padhiyar gaurang
May 31 at 6:24
Sir I tried this but it gives me an error
Exception #0 (MagentoFrameworkExceptionLocalizedException): 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 )
– Asad Khan
May 31 at 6:18
Sir I tried this but it gives me an error
Exception #0 (MagentoFrameworkExceptionLocalizedException): 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 )
– Asad Khan
May 31 at 6:18
Please clear cache after changes suggested by Marius .
– padhiyar gaurang
May 31 at 6:24
Please clear cache after changes suggested by Marius .
– padhiyar gaurang
May 31 at 6:24
add a comment |
<?xml version="1.0" encoding="UTF-8"?>
<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="MbCustomizationsObserverProductCanonical"/>
</event>
</config>
Make sure your XML is UTF-8 formatted, Then do cache flush and try it.
add a comment |
<?xml version="1.0" encoding="UTF-8"?>
<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="MbCustomizationsObserverProductCanonical"/>
</event>
</config>
Make sure your XML is UTF-8 formatted, Then do cache flush and try it.
add a comment |
<?xml version="1.0" encoding="UTF-8"?>
<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="MbCustomizationsObserverProductCanonical"/>
</event>
</config>
Make sure your XML is UTF-8 formatted, Then do cache flush and try it.
<?xml version="1.0" encoding="UTF-8"?>
<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="MbCustomizationsObserverProductCanonical"/>
</event>
</config>
Make sure your XML is UTF-8 formatted, Then do cache flush and try it.
answered May 31 at 6:23
Sunil PatelSunil Patel
1,5231612
1,5231612
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f276808%2fthe-attribute-cachable-is-not-allowed-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
cachable="false"
should only be used for blocks not for events. here is the full docs from magento devdocs.magento.com/guides/v2.2/extension-dev-guide/cache/…– Aman Alam
May 31 at 6:00
ok fine but when I remove the
cachable
then it give me another error1 exception(s): Exception #0 (MagentoFrameworkExceptionLocalizedException): 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
– Asad Khan
May 31 at 6:02
Cachable? Cashable? Cacheable? Man, that typo variations can kill you :) My bet is you may have some white space in that XML between config and event after cleaning the wrong references
– Raul Sanchez
May 31 at 6:02
Please post your XML?
magento/app/code/TM/Crm/etc/frontend/events.xml
– Khoa TruongDinh
May 31 at 6:05
@KhoaTruongDinh Sir question updated kindly check it
– Asad Khan
May 31 at 6:11