magento2 -custom layout file not loading Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Magento custom module - cannot load layout file via XMLLoading Custom Blocks and Layoutsmagento 2 captcha not rendering if I override layout xmlmagento2 unable to override custom search engine- getting blank pagemagento2 toolbar.phtml issue-not overridingCatalog Category not loading with pagerUpdate block arguemnts in xml file (Recommended way not working)Extend admin/login.phtml: Invalid template fileCreate empty page on custom admin url

How does light 'choose' between wave and particle behaviour?

The test team as an enemy of development? And how can this be avoided?

Why do early math courses focus on the cross sections of a cone and not on other 3D objects?

I can't produce songs

How much damage would a cupful of neutron star matter do to the Earth?

Putting class ranking in CV, but against dept guidelines

What is the role of と after a noun when it doesn't appear to count or list anything?

Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?

GDP with Intermediate Production

What does the writing on Poe's helmet say?

What is a more techy Technical Writer job title that isn't cutesy or confusing?

What order were files/directories output in dir?

Is there hard evidence that the grant peer review system performs significantly better than random?

Random body shuffle every night—can we still function?

Did Mueller's report provide an evidentiary basis for the claim of Russian govt election interference via social media?

How do living politicians protect their readily obtainable signatures from misuse?

AppleTVs create a chatty alternate WiFi network

What would you call this weird metallic apparatus that allows you to lift people?

White walkers, cemeteries and wights

Relating to the President and obstruction, were Mueller's conclusions preordained?

Is openssl rand command cryptographically secure?

In musical terms, what properties are varied by the human voice to produce different words / syllables?

Why not send Voyager 3 and 4 following up the paths taken by Voyager 1 and 2 to re-transmit signals of later as they fly away from Earth?

Does silver oxide react with hydrogen sulfide?



magento2 -custom layout file not loading



Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Magento custom module - cannot load layout file via XMLLoading Custom Blocks and Layoutsmagento 2 captcha not rendering if I override layout xmlmagento2 unable to override custom search engine- getting blank pagemagento2 toolbar.phtml issue-not overridingCatalog Category not loading with pagerUpdate block arguemnts in xml file (Recommended way not working)Extend admin/login.phtml: Invalid template fileCreate empty page on custom admin url



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















i have followed the below link in order to get check if our custom layout xml file is loaded or not using the event: layout_generate_blocks_after



In the log file i just get:



2016-06-29T11:07:40+00:00 INFO (6):



 <layout/>


which should actually load my custom layout file :
catalogsearch_catalogsearch_resultcontroller.xml



Could any1 please help why my layout file is not loading.



UPDATED: LAYOUT file catalogsearch_catalogsearch_resultcontroller.xml



controller path:



  • VendorModuleControllerCatalog


  • VendorModuleControllerCatalogSearch


  • VendorModuleControllerCatalogSearchResult.php


  • VendorModuleControllerCatalogSearchResultController.php


VendorModuleviewfrontendlayoutcatalogsearch_catalogsearch_resultcontroller.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="catalogsearch.leftnav"><arguments>
<argument name="setTemplate" xsi:type="string">VendorModule::search/filter.phtml</argument>
</arguments>
</referenceBlock>

<referenceBlock name="product_searchlist_toolbar">
<arguments>
<argument name="template" xsi:type="string">VendorModule::toolbar/toolbar.phtml</argument>
</arguments>
</referenceBlock>

</body>




Above xml was replicated from 1x code which was as :



<?xml version="1.0"?>
<layout version="0.1.0">
<catalogsearch_result_index>
<reference name="catalogsearch.leftnav">
<action method="setTemplate">
<setTemplate>/filter.phtml</setTemplate>
</action>
</reference>
<reference name="content">
<reference type="catalogsearch/result" name="search.result">
<reference name="search_result_list">
<reference name="product_list_toolbar">
<action method="setTemplate">
<template>toolbar.phtml</template>
</action>
</reference>
</reference>
</reference>
</reference>
</catalogsearch_result_index>
</layout>


system.log :



Cache file with merged layout: LAYOUT_frontend_STORE1_3d41d8cd98f00b204e9800998ecf8427e and handles : Please correct the XML data and try again. [] []









share|improve this question
















bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    Could you please post the code of your layout file ?

    – Raphael at Digital Pianism
    Jun 29 '16 at 11:18











  • i have updated the layout file

    – Sushivam
    Jun 29 '16 at 11:35











  • layout ending tag is already there, i just forgot to give tab while adding question. and its magento1x code which i had replicated to magento2x layout file where the issue is

    – Sushivam
    Jun 29 '16 at 11:42











  • See my updated answer

    – Raphael at Digital Pianism
    Jun 29 '16 at 11:45

















4















i have followed the below link in order to get check if our custom layout xml file is loaded or not using the event: layout_generate_blocks_after



In the log file i just get:



2016-06-29T11:07:40+00:00 INFO (6):



 <layout/>


which should actually load my custom layout file :
catalogsearch_catalogsearch_resultcontroller.xml



Could any1 please help why my layout file is not loading.



UPDATED: LAYOUT file catalogsearch_catalogsearch_resultcontroller.xml



controller path:



  • VendorModuleControllerCatalog


  • VendorModuleControllerCatalogSearch


  • VendorModuleControllerCatalogSearchResult.php


  • VendorModuleControllerCatalogSearchResultController.php


VendorModuleviewfrontendlayoutcatalogsearch_catalogsearch_resultcontroller.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="catalogsearch.leftnav"><arguments>
<argument name="setTemplate" xsi:type="string">VendorModule::search/filter.phtml</argument>
</arguments>
</referenceBlock>

<referenceBlock name="product_searchlist_toolbar">
<arguments>
<argument name="template" xsi:type="string">VendorModule::toolbar/toolbar.phtml</argument>
</arguments>
</referenceBlock>

</body>




Above xml was replicated from 1x code which was as :



<?xml version="1.0"?>
<layout version="0.1.0">
<catalogsearch_result_index>
<reference name="catalogsearch.leftnav">
<action method="setTemplate">
<setTemplate>/filter.phtml</setTemplate>
</action>
</reference>
<reference name="content">
<reference type="catalogsearch/result" name="search.result">
<reference name="search_result_list">
<reference name="product_list_toolbar">
<action method="setTemplate">
<template>toolbar.phtml</template>
</action>
</reference>
</reference>
</reference>
</reference>
</catalogsearch_result_index>
</layout>


system.log :



Cache file with merged layout: LAYOUT_frontend_STORE1_3d41d8cd98f00b204e9800998ecf8427e and handles : Please correct the XML data and try again. [] []









share|improve this question
















bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    Could you please post the code of your layout file ?

    – Raphael at Digital Pianism
    Jun 29 '16 at 11:18











  • i have updated the layout file

    – Sushivam
    Jun 29 '16 at 11:35











  • layout ending tag is already there, i just forgot to give tab while adding question. and its magento1x code which i had replicated to magento2x layout file where the issue is

    – Sushivam
    Jun 29 '16 at 11:42











  • See my updated answer

    – Raphael at Digital Pianism
    Jun 29 '16 at 11:45













4












4








4








i have followed the below link in order to get check if our custom layout xml file is loaded or not using the event: layout_generate_blocks_after



In the log file i just get:



2016-06-29T11:07:40+00:00 INFO (6):



 <layout/>


which should actually load my custom layout file :
catalogsearch_catalogsearch_resultcontroller.xml



Could any1 please help why my layout file is not loading.



UPDATED: LAYOUT file catalogsearch_catalogsearch_resultcontroller.xml



controller path:



  • VendorModuleControllerCatalog


  • VendorModuleControllerCatalogSearch


  • VendorModuleControllerCatalogSearchResult.php


  • VendorModuleControllerCatalogSearchResultController.php


VendorModuleviewfrontendlayoutcatalogsearch_catalogsearch_resultcontroller.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="catalogsearch.leftnav"><arguments>
<argument name="setTemplate" xsi:type="string">VendorModule::search/filter.phtml</argument>
</arguments>
</referenceBlock>

<referenceBlock name="product_searchlist_toolbar">
<arguments>
<argument name="template" xsi:type="string">VendorModule::toolbar/toolbar.phtml</argument>
</arguments>
</referenceBlock>

</body>




Above xml was replicated from 1x code which was as :



<?xml version="1.0"?>
<layout version="0.1.0">
<catalogsearch_result_index>
<reference name="catalogsearch.leftnav">
<action method="setTemplate">
<setTemplate>/filter.phtml</setTemplate>
</action>
</reference>
<reference name="content">
<reference type="catalogsearch/result" name="search.result">
<reference name="search_result_list">
<reference name="product_list_toolbar">
<action method="setTemplate">
<template>toolbar.phtml</template>
</action>
</reference>
</reference>
</reference>
</reference>
</catalogsearch_result_index>
</layout>


system.log :



Cache file with merged layout: LAYOUT_frontend_STORE1_3d41d8cd98f00b204e9800998ecf8427e and handles : Please correct the XML data and try again. [] []









share|improve this question
















i have followed the below link in order to get check if our custom layout xml file is loaded or not using the event: layout_generate_blocks_after



In the log file i just get:



2016-06-29T11:07:40+00:00 INFO (6):



 <layout/>


which should actually load my custom layout file :
catalogsearch_catalogsearch_resultcontroller.xml



Could any1 please help why my layout file is not loading.



UPDATED: LAYOUT file catalogsearch_catalogsearch_resultcontroller.xml



controller path:



  • VendorModuleControllerCatalog


  • VendorModuleControllerCatalogSearch


  • VendorModuleControllerCatalogSearchResult.php


  • VendorModuleControllerCatalogSearchResultController.php


VendorModuleviewfrontendlayoutcatalogsearch_catalogsearch_resultcontroller.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="catalogsearch.leftnav"><arguments>
<argument name="setTemplate" xsi:type="string">VendorModule::search/filter.phtml</argument>
</arguments>
</referenceBlock>

<referenceBlock name="product_searchlist_toolbar">
<arguments>
<argument name="template" xsi:type="string">VendorModule::toolbar/toolbar.phtml</argument>
</arguments>
</referenceBlock>

</body>




Above xml was replicated from 1x code which was as :



<?xml version="1.0"?>
<layout version="0.1.0">
<catalogsearch_result_index>
<reference name="catalogsearch.leftnav">
<action method="setTemplate">
<setTemplate>/filter.phtml</setTemplate>
</action>
</reference>
<reference name="content">
<reference type="catalogsearch/result" name="search.result">
<reference name="search_result_list">
<reference name="product_list_toolbar">
<action method="setTemplate">
<template>toolbar.phtml</template>
</action>
</reference>
</reference>
</reference>
</reference>
</catalogsearch_result_index>
</layout>


system.log :



Cache file with merged layout: LAYOUT_frontend_STORE1_3d41d8cd98f00b204e9800998ecf8427e and handles : Please correct the XML data and try again. [] []






magento2 layout error blocks






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 3 '18 at 0:39









Rohan Hapani

7,01631865




7,01631865










asked Jun 29 '16 at 11:12









SushivamSushivam

1,26021547




1,26021547





bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.









  • 1





    Could you please post the code of your layout file ?

    – Raphael at Digital Pianism
    Jun 29 '16 at 11:18











  • i have updated the layout file

    – Sushivam
    Jun 29 '16 at 11:35











  • layout ending tag is already there, i just forgot to give tab while adding question. and its magento1x code which i had replicated to magento2x layout file where the issue is

    – Sushivam
    Jun 29 '16 at 11:42











  • See my updated answer

    – Raphael at Digital Pianism
    Jun 29 '16 at 11:45












  • 1





    Could you please post the code of your layout file ?

    – Raphael at Digital Pianism
    Jun 29 '16 at 11:18











  • i have updated the layout file

    – Sushivam
    Jun 29 '16 at 11:35











  • layout ending tag is already there, i just forgot to give tab while adding question. and its magento1x code which i had replicated to magento2x layout file where the issue is

    – Sushivam
    Jun 29 '16 at 11:42











  • See my updated answer

    – Raphael at Digital Pianism
    Jun 29 '16 at 11:45







1




1





Could you please post the code of your layout file ?

– Raphael at Digital Pianism
Jun 29 '16 at 11:18





Could you please post the code of your layout file ?

– Raphael at Digital Pianism
Jun 29 '16 at 11:18













i have updated the layout file

– Sushivam
Jun 29 '16 at 11:35





i have updated the layout file

– Sushivam
Jun 29 '16 at 11:35













layout ending tag is already there, i just forgot to give tab while adding question. and its magento1x code which i had replicated to magento2x layout file where the issue is

– Sushivam
Jun 29 '16 at 11:42





layout ending tag is already there, i just forgot to give tab while adding question. and its magento1x code which i had replicated to magento2x layout file where the issue is

– Sushivam
Jun 29 '16 at 11:42













See my updated answer

– Raphael at Digital Pianism
Jun 29 '16 at 11:45





See my updated answer

– Raphael at Digital Pianism
Jun 29 '16 at 11:45










1 Answer
1






active

oldest

votes


















0














It is because your file is not properly named.



It should be catalogsearch_result_index.xml instead of catalogsearch_catalogsearch_resultcontroller.xml






share|improve this answer

























  • thats the magento1x xml file, which i forgot to tab while adding question...</layout> is already there.

    – Sushivam
    Jun 29 '16 at 11:39











  • But i dont have result/index in my custom module... i have the controller path as shown... should i still give catalogsearch_result_index.xml name instead, with just content replaced

    – Sushivam
    Jun 29 '16 at 11:51











  • i followed... routerfrontname_controlleraction_controllername.xml for naming the layout of my custom xml... is it rite? or should i use the default magentos catalogsearch_result_index

    – Sushivam
    Jun 29 '16 at 11:57











  • please see my system .log says in my updated answer

    – Sushivam
    Jun 29 '16 at 11:58






  • 1





    Did you ever get an answer to this?

    – LM_Fielding
    Aug 22 '16 at 10:08











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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f123385%2fmagento2-custom-layout-file-not-loading%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














It is because your file is not properly named.



It should be catalogsearch_result_index.xml instead of catalogsearch_catalogsearch_resultcontroller.xml






share|improve this answer

























  • thats the magento1x xml file, which i forgot to tab while adding question...</layout> is already there.

    – Sushivam
    Jun 29 '16 at 11:39











  • But i dont have result/index in my custom module... i have the controller path as shown... should i still give catalogsearch_result_index.xml name instead, with just content replaced

    – Sushivam
    Jun 29 '16 at 11:51











  • i followed... routerfrontname_controlleraction_controllername.xml for naming the layout of my custom xml... is it rite? or should i use the default magentos catalogsearch_result_index

    – Sushivam
    Jun 29 '16 at 11:57











  • please see my system .log says in my updated answer

    – Sushivam
    Jun 29 '16 at 11:58






  • 1





    Did you ever get an answer to this?

    – LM_Fielding
    Aug 22 '16 at 10:08















0














It is because your file is not properly named.



It should be catalogsearch_result_index.xml instead of catalogsearch_catalogsearch_resultcontroller.xml






share|improve this answer

























  • thats the magento1x xml file, which i forgot to tab while adding question...</layout> is already there.

    – Sushivam
    Jun 29 '16 at 11:39











  • But i dont have result/index in my custom module... i have the controller path as shown... should i still give catalogsearch_result_index.xml name instead, with just content replaced

    – Sushivam
    Jun 29 '16 at 11:51











  • i followed... routerfrontname_controlleraction_controllername.xml for naming the layout of my custom xml... is it rite? or should i use the default magentos catalogsearch_result_index

    – Sushivam
    Jun 29 '16 at 11:57











  • please see my system .log says in my updated answer

    – Sushivam
    Jun 29 '16 at 11:58






  • 1





    Did you ever get an answer to this?

    – LM_Fielding
    Aug 22 '16 at 10:08













0












0








0







It is because your file is not properly named.



It should be catalogsearch_result_index.xml instead of catalogsearch_catalogsearch_resultcontroller.xml






share|improve this answer















It is because your file is not properly named.



It should be catalogsearch_result_index.xml instead of catalogsearch_catalogsearch_resultcontroller.xml







share|improve this answer














share|improve this answer



share|improve this answer








edited Jun 29 '16 at 11:45

























answered Jun 29 '16 at 11:37









Raphael at Digital PianismRaphael at Digital Pianism

55.2k22124280




55.2k22124280












  • thats the magento1x xml file, which i forgot to tab while adding question...</layout> is already there.

    – Sushivam
    Jun 29 '16 at 11:39











  • But i dont have result/index in my custom module... i have the controller path as shown... should i still give catalogsearch_result_index.xml name instead, with just content replaced

    – Sushivam
    Jun 29 '16 at 11:51











  • i followed... routerfrontname_controlleraction_controllername.xml for naming the layout of my custom xml... is it rite? or should i use the default magentos catalogsearch_result_index

    – Sushivam
    Jun 29 '16 at 11:57











  • please see my system .log says in my updated answer

    – Sushivam
    Jun 29 '16 at 11:58






  • 1





    Did you ever get an answer to this?

    – LM_Fielding
    Aug 22 '16 at 10:08

















  • thats the magento1x xml file, which i forgot to tab while adding question...</layout> is already there.

    – Sushivam
    Jun 29 '16 at 11:39











  • But i dont have result/index in my custom module... i have the controller path as shown... should i still give catalogsearch_result_index.xml name instead, with just content replaced

    – Sushivam
    Jun 29 '16 at 11:51











  • i followed... routerfrontname_controlleraction_controllername.xml for naming the layout of my custom xml... is it rite? or should i use the default magentos catalogsearch_result_index

    – Sushivam
    Jun 29 '16 at 11:57











  • please see my system .log says in my updated answer

    – Sushivam
    Jun 29 '16 at 11:58






  • 1





    Did you ever get an answer to this?

    – LM_Fielding
    Aug 22 '16 at 10:08
















thats the magento1x xml file, which i forgot to tab while adding question...</layout> is already there.

– Sushivam
Jun 29 '16 at 11:39





thats the magento1x xml file, which i forgot to tab while adding question...</layout> is already there.

– Sushivam
Jun 29 '16 at 11:39













But i dont have result/index in my custom module... i have the controller path as shown... should i still give catalogsearch_result_index.xml name instead, with just content replaced

– Sushivam
Jun 29 '16 at 11:51





But i dont have result/index in my custom module... i have the controller path as shown... should i still give catalogsearch_result_index.xml name instead, with just content replaced

– Sushivam
Jun 29 '16 at 11:51













i followed... routerfrontname_controlleraction_controllername.xml for naming the layout of my custom xml... is it rite? or should i use the default magentos catalogsearch_result_index

– Sushivam
Jun 29 '16 at 11:57





i followed... routerfrontname_controlleraction_controllername.xml for naming the layout of my custom xml... is it rite? or should i use the default magentos catalogsearch_result_index

– Sushivam
Jun 29 '16 at 11:57













please see my system .log says in my updated answer

– Sushivam
Jun 29 '16 at 11:58





please see my system .log says in my updated answer

– Sushivam
Jun 29 '16 at 11:58




1




1





Did you ever get an answer to this?

– LM_Fielding
Aug 22 '16 at 10:08





Did you ever get an answer to this?

– LM_Fielding
Aug 22 '16 at 10:08

















draft saved

draft discarded
















































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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f123385%2fmagento2-custom-layout-file-not-loading%23new-answer', 'question_page');

);

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







Popular posts from this blog

Nidaros erkebispedøme

Birsay

Where did Arya get these scars? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Favourite questions and answers from the 1st quarter of 2019Why did Arya refuse to end it?Has the pronunciation of Arya Stark's name changed?Has Arya forgiven people?Why did Arya Stark lose her vision?Why can Arya still use the faces?Has the Narrow Sea become narrower?Does Arya Stark know how to make poisons outside of the House of Black and White?Why did Nymeria leave Arya?Why did Arya not kill the Lannister soldiers she encountered in the Riverlands?What is the current canonical age of Sansa, Bran and Arya Stark?