Any change to default.xml breaks homepage layoutupdate layout using custom layout handlesChange the default layout template programaticallymagento 2 : where is Layout XML File for Homepage locatedHow to change block order in layout xmlOverriding module-checkout > view > frontend > layout > default.xmlHow do I add canonical or any meta head in Magento 2 via CMS Layout XMLs?Can I use Magento_Theme/layout/default.xml for all layout updates?Prevent page layout from inheriting default.xml?Unable to change layout of checkout_onepage_success?Is it possible to define a default.xml layout in a custom module but only affects the default.xml of that module?

On a tidally locked planet, would time be quantized?

Are Captain Marvel's powers affected by Thanos' actions in Infinity War

Invalid date error by date command

Why Shazam when there is already Superman?

Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?

Why is so much work done on numerical verification of the Riemann Hypothesis?

Lowest total scrabble score

What is going on with 'gets(stdin)' on the site coderbyte?

Is there a RAID 0 Equivalent for RAM?

How to rewrite equation of hyperbola in standard form

How do apertures which seem too large to physically fit work?

What exact color does ozone gas have?

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

Extract more than nine arguments that occur periodically in a sentence to use in macros in order to typset

What is the highest possible scrabble score for placing a single tile

Add big quotation marks inside my colorbox

Why is it that I can sometimes guess the next note?

Yosemite Fire Rings - What to Expect?

Calculate sum of polynomial roots

Is this toilet slogan correct usage of the English language?

Can I say "fingers" when referring to toes?

Multiplicative persistence

Review your own paper in Mathematics

What are some good ways to treat frozen vegetables such that they behave like fresh vegetables when stir frying them?



Any change to default.xml breaks homepage layout


update layout using custom layout handlesChange the default layout template programaticallymagento 2 : where is Layout XML File for Homepage locatedHow to change block order in layout xmlOverriding module-checkout > view > frontend > layout > default.xmlHow do I add canonical or any meta head in Magento 2 via CMS Layout XMLs?Can I use Magento_Theme/layout/default.xml for all layout updates?Prevent page layout from inheriting default.xml?Unable to change layout of checkout_onepage_success?Is it possible to define a default.xml layout in a custom module but only affects the default.xml of that module?













0















Fairly new to Magento 2. Working from a cloned version of another site and trying to make simple, cosmetic changes to the custom theme homepage here:



app/design/frontend/Vendor/Theme/Magento_Theme/layout/default.xml


Any change I make manifests immediately, but unrelated parts of the page break at the same time. Most of what's in page-header disappears, and a new div called nav-sections appears with all our categories in it.



These exact changes occur regardless of how I alter default.xml -- even adding a character to a string causes them.



My hunch is it's a question of workflow, and I'm still unclear about when and how Magento 2 decides to create and serve files from pub/static, generated, and var/generated.



I should also note that I'm making these changes in production mode, and that running deploy doesn't fix anything.



What am I doing wrong here?










share|improve this question
















bumped to the homepage by Community 3 mins ago


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















  • In production mode, you need to deploy the static-content every time you make changes ! command : php bin/magento setup:static-content:deploy

    – PЯINCƏ
    Mar 21 '18 at 15:23











  • Thanks, but the layout breaks even before running the deploy command, and stays broken after running it.

    – mxtthxw
    Mar 21 '18 at 16:36















0















Fairly new to Magento 2. Working from a cloned version of another site and trying to make simple, cosmetic changes to the custom theme homepage here:



app/design/frontend/Vendor/Theme/Magento_Theme/layout/default.xml


Any change I make manifests immediately, but unrelated parts of the page break at the same time. Most of what's in page-header disappears, and a new div called nav-sections appears with all our categories in it.



These exact changes occur regardless of how I alter default.xml -- even adding a character to a string causes them.



My hunch is it's a question of workflow, and I'm still unclear about when and how Magento 2 decides to create and serve files from pub/static, generated, and var/generated.



I should also note that I'm making these changes in production mode, and that running deploy doesn't fix anything.



What am I doing wrong here?










share|improve this question
















bumped to the homepage by Community 3 mins ago


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















  • In production mode, you need to deploy the static-content every time you make changes ! command : php bin/magento setup:static-content:deploy

    – PЯINCƏ
    Mar 21 '18 at 15:23











  • Thanks, but the layout breaks even before running the deploy command, and stays broken after running it.

    – mxtthxw
    Mar 21 '18 at 16:36













0












0








0








Fairly new to Magento 2. Working from a cloned version of another site and trying to make simple, cosmetic changes to the custom theme homepage here:



app/design/frontend/Vendor/Theme/Magento_Theme/layout/default.xml


Any change I make manifests immediately, but unrelated parts of the page break at the same time. Most of what's in page-header disappears, and a new div called nav-sections appears with all our categories in it.



These exact changes occur regardless of how I alter default.xml -- even adding a character to a string causes them.



My hunch is it's a question of workflow, and I'm still unclear about when and how Magento 2 decides to create and serve files from pub/static, generated, and var/generated.



I should also note that I'm making these changes in production mode, and that running deploy doesn't fix anything.



What am I doing wrong here?










share|improve this question
















Fairly new to Magento 2. Working from a cloned version of another site and trying to make simple, cosmetic changes to the custom theme homepage here:



app/design/frontend/Vendor/Theme/Magento_Theme/layout/default.xml


Any change I make manifests immediately, but unrelated parts of the page break at the same time. Most of what's in page-header disappears, and a new div called nav-sections appears with all our categories in it.



These exact changes occur regardless of how I alter default.xml -- even adding a character to a string causes them.



My hunch is it's a question of workflow, and I'm still unclear about when and how Magento 2 decides to create and serve files from pub/static, generated, and var/generated.



I should also note that I'm making these changes in production mode, and that running deploy doesn't fix anything.



What am I doing wrong here?







magento2 layout xml deployment






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 21 '18 at 16:37







mxtthxw

















asked Mar 21 '18 at 15:03









mxtthxwmxtthxw

13




13





bumped to the homepage by Community 3 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 3 mins ago


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














  • In production mode, you need to deploy the static-content every time you make changes ! command : php bin/magento setup:static-content:deploy

    – PЯINCƏ
    Mar 21 '18 at 15:23











  • Thanks, but the layout breaks even before running the deploy command, and stays broken after running it.

    – mxtthxw
    Mar 21 '18 at 16:36

















  • In production mode, you need to deploy the static-content every time you make changes ! command : php bin/magento setup:static-content:deploy

    – PЯINCƏ
    Mar 21 '18 at 15:23











  • Thanks, but the layout breaks even before running the deploy command, and stays broken after running it.

    – mxtthxw
    Mar 21 '18 at 16:36
















In production mode, you need to deploy the static-content every time you make changes ! command : php bin/magento setup:static-content:deploy

– PЯINCƏ
Mar 21 '18 at 15:23





In production mode, you need to deploy the static-content every time you make changes ! command : php bin/magento setup:static-content:deploy

– PЯINCƏ
Mar 21 '18 at 15:23













Thanks, but the layout breaks even before running the deploy command, and stays broken after running it.

– mxtthxw
Mar 21 '18 at 16:36





Thanks, but the layout breaks even before running the deploy command, and stays broken after running it.

– mxtthxw
Mar 21 '18 at 16:36










2 Answers
2






active

oldest

votes


















0














I think that you have removed some properties from your custom default.xml or you have some errors on it please try this:



  1. Copy the original default.xml from the parent theme to the custom one.

  2. Clear the content folder of : pub/static, var/view_preprocessed, var/cache


  3. Launch this command : php bin/magento setup:static-content:deploy -f


  4. Check line by line the property who breaks you layout.






share|improve this answer






























    0














    It's simple solution.



    by default Magento 2 just join file so core file with your get compile to one.



    Block and component with are initialize with the same name as core will dissapear (after copying to theme folder).



    You need to replace name in:
    app/design/frontend/Vendor/Theme/Magento_Theme/layout/default.xml



    Change name attribute only in: <block... or <container...
    References don't need to be fixed. Be sure that name is uniquely across system.



    Example:



    From:
    <block class="MagentoThemeBlockHtmlTitle" name="page.main.title" template="Magento_Theme::html/title.phtml"/>



    To:



    <block class="MagentoThemeBlockHtmlTitle" name="custom.page.main.title" template="Magento_Theme::html/title.phtml"/>




    WARNING: This will create new block after existing one. If you need to
    replace then replace <block... to <referenceBlock... as described
    in
    http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-instructions.html







    share|improve this answer






















      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%2f219263%2fany-change-to-default-xml-breaks-homepage-layout%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









      0














      I think that you have removed some properties from your custom default.xml or you have some errors on it please try this:



      1. Copy the original default.xml from the parent theme to the custom one.

      2. Clear the content folder of : pub/static, var/view_preprocessed, var/cache


      3. Launch this command : php bin/magento setup:static-content:deploy -f


      4. Check line by line the property who breaks you layout.






      share|improve this answer



























        0














        I think that you have removed some properties from your custom default.xml or you have some errors on it please try this:



        1. Copy the original default.xml from the parent theme to the custom one.

        2. Clear the content folder of : pub/static, var/view_preprocessed, var/cache


        3. Launch this command : php bin/magento setup:static-content:deploy -f


        4. Check line by line the property who breaks you layout.






        share|improve this answer

























          0












          0








          0







          I think that you have removed some properties from your custom default.xml or you have some errors on it please try this:



          1. Copy the original default.xml from the parent theme to the custom one.

          2. Clear the content folder of : pub/static, var/view_preprocessed, var/cache


          3. Launch this command : php bin/magento setup:static-content:deploy -f


          4. Check line by line the property who breaks you layout.






          share|improve this answer













          I think that you have removed some properties from your custom default.xml or you have some errors on it please try this:



          1. Copy the original default.xml from the parent theme to the custom one.

          2. Clear the content folder of : pub/static, var/view_preprocessed, var/cache


          3. Launch this command : php bin/magento setup:static-content:deploy -f


          4. Check line by line the property who breaks you layout.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 21 '18 at 16:55









          PЯINCƏPЯINCƏ

          8,37131144




          8,37131144























              0














              It's simple solution.



              by default Magento 2 just join file so core file with your get compile to one.



              Block and component with are initialize with the same name as core will dissapear (after copying to theme folder).



              You need to replace name in:
              app/design/frontend/Vendor/Theme/Magento_Theme/layout/default.xml



              Change name attribute only in: <block... or <container...
              References don't need to be fixed. Be sure that name is uniquely across system.



              Example:



              From:
              <block class="MagentoThemeBlockHtmlTitle" name="page.main.title" template="Magento_Theme::html/title.phtml"/>



              To:



              <block class="MagentoThemeBlockHtmlTitle" name="custom.page.main.title" template="Magento_Theme::html/title.phtml"/>




              WARNING: This will create new block after existing one. If you need to
              replace then replace <block... to <referenceBlock... as described
              in
              http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-instructions.html







              share|improve this answer



























                0














                It's simple solution.



                by default Magento 2 just join file so core file with your get compile to one.



                Block and component with are initialize with the same name as core will dissapear (after copying to theme folder).



                You need to replace name in:
                app/design/frontend/Vendor/Theme/Magento_Theme/layout/default.xml



                Change name attribute only in: <block... or <container...
                References don't need to be fixed. Be sure that name is uniquely across system.



                Example:



                From:
                <block class="MagentoThemeBlockHtmlTitle" name="page.main.title" template="Magento_Theme::html/title.phtml"/>



                To:



                <block class="MagentoThemeBlockHtmlTitle" name="custom.page.main.title" template="Magento_Theme::html/title.phtml"/>




                WARNING: This will create new block after existing one. If you need to
                replace then replace <block... to <referenceBlock... as described
                in
                http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-instructions.html







                share|improve this answer

























                  0












                  0








                  0







                  It's simple solution.



                  by default Magento 2 just join file so core file with your get compile to one.



                  Block and component with are initialize with the same name as core will dissapear (after copying to theme folder).



                  You need to replace name in:
                  app/design/frontend/Vendor/Theme/Magento_Theme/layout/default.xml



                  Change name attribute only in: <block... or <container...
                  References don't need to be fixed. Be sure that name is uniquely across system.



                  Example:



                  From:
                  <block class="MagentoThemeBlockHtmlTitle" name="page.main.title" template="Magento_Theme::html/title.phtml"/>



                  To:



                  <block class="MagentoThemeBlockHtmlTitle" name="custom.page.main.title" template="Magento_Theme::html/title.phtml"/>




                  WARNING: This will create new block after existing one. If you need to
                  replace then replace <block... to <referenceBlock... as described
                  in
                  http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-instructions.html







                  share|improve this answer













                  It's simple solution.



                  by default Magento 2 just join file so core file with your get compile to one.



                  Block and component with are initialize with the same name as core will dissapear (after copying to theme folder).



                  You need to replace name in:
                  app/design/frontend/Vendor/Theme/Magento_Theme/layout/default.xml



                  Change name attribute only in: <block... or <container...
                  References don't need to be fixed. Be sure that name is uniquely across system.



                  Example:



                  From:
                  <block class="MagentoThemeBlockHtmlTitle" name="page.main.title" template="Magento_Theme::html/title.phtml"/>



                  To:



                  <block class="MagentoThemeBlockHtmlTitle" name="custom.page.main.title" template="Magento_Theme::html/title.phtml"/>




                  WARNING: This will create new block after existing one. If you need to
                  replace then replace <block... to <referenceBlock... as described
                  in
                  http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-instructions.html








                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 21 '18 at 18:04









                  Patryk PadusPatryk Padus

                  1748




                  1748



























                      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%2f219263%2fany-change-to-default-xml-breaks-homepage-layout%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

                      Disable / Remove link to Product Items in Cart 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?How can I limit products that can be bought / added to cart?Remove item from cartHide “Add to Cart” button if specific products are already in cart“Prettifying” the custom options in cart pageCreate link in cart sidebar to view all added items After limit reachedLink products together in checkout/cartHow to Get product from cart and add it againHide action-edit on cart page if simple productRemoving Cart items - ObserverRemove wishlist items when added to cart

                      Helsingin valtaus Sisällysluettelo Taustaa | Yleistä sotatoimista | Osapuolet | Taistelut Helsingin ympäristössä | Punaisten antautumissuunnitelma | Taistelujen kulku Helsingissä | Valtauksen jälkeen | Tappiot | Muistaminen | Kirjallisuutta | Lähteet | Aiheesta muualla | NavigointivalikkoTeoksen verkkoversioTeoksen verkkoversioGoogle BooksSisällissota Helsingissä päättyi tasan 95 vuotta sittenSaksalaisten ylivoima jyräsi punaisen HelsinginSuomalaiset kuvaavat sotien jälkiä kaupungeissa – katso kuvat ja tarinat tutuilta kulmiltaHelsingin valtaus 90 vuotta sittenSaksalaiset valtasivat HelsinginHyökkäys HelsinkiinHelsingin valtaus 12.–13.4. 1918Saksalaiset käyttivät ihmiskilpiä Helsingin valtauksessa 1918Teoksen verkkoversioTeoksen verkkoversioSaksalaiset hyökkäävät Etelä-SuomeenTaistelut LeppävaarassaSotilaat ja taistelutLeppävaara 1918 huhtikuussa. KapinatarinaHelsingin taistelut 1918Saksalaisten voitonparaati HelsingissäHelsingin valtausta juhlittiinSaksalaisten Helsinki vuonna 1918Helsingin taistelussa kaatuneet valkokaartilaisetHelsinkiin haudatut taisteluissa kaatuneet punaiset12.4.1918 Helsingin valtauksessa saksalaiset apujoukot vapauttavat kaupunginVapaussodan muistomerkkejä Helsingissä ja pääkaupunkiseudullaCrescendo / Vuoden 1918 Kansalaissodan uhrien muistomerkkim

                      Adjektiivitarina Tarinan tekeminen | Esimerkki: ennen | Esimerkki: jälkeen | Navigointivalikko