2 Comments

Changes in Magento_Theme > layout are suddenly ignored (Magento 2)

Magento 2 indexer not working in PHP 7 (7.0.4)
Automatically change shipping method when order is created

I have removed the CSS in default_head_blocks.xml successfully like this:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="css/test.css" />
        <remove src="css/styles-m.css" />
        <remove src="css/styles-l.css" media="screen and (min-width: 768px)"/>
        <remove src="css/print.css" media="print" />
    </head>
</page>

Now I made some changes on CSS. After I turn all back as it was before it shows me Lumina CSS and it also ignores changes I made in default.xml. Before it works all, but now my changes in this Folder are ignored:

Theme > Magento_Theme > layout

I have no idea why

Related Posts

  • Magento2 – pub static css not found (2)
    In developer mode I been getting the error FileError: '/pub/static/frontend/theme/theme_name/en_GB/css/styles-m.css' wasn't found (404) I've taken the following steps to try and resolve this: Used Refresh static content in the cache management Taken magento2 out of development […]
  • Custome Magento 2 Theme (0)
    I created a custom Magento 2 Theme based on blank. MY Folder Structure looks like this. ~/app/design/frontend/Vendor_Name/Theme /theme.xml /registration.php /composer.json /media/theme-screenshot.jpg /web/css/source /fonts /images /js […]
  • Trouble overriding layout file in Magento 2 (3)
    I'm using Magento 2.02 I've created my own theme called 'cff', which is based on Luma. I'm trying to remove the catalog.compare.link block in top.links The layout for this block seems to be defined in /vendor/magento/module-catalog/view/frontend/layout/default.xml And if I add […]
  • Magento just stops loading layout from time to time – why? (0)
    I have a problem with my Magento 1.9.x store. From time to time it stops loading the CSS files for no clear reason. The log files contain no information. I looked at the source code and normally my CSS is loaded like this: […]
  • Magento 2 custom theme layout xml and css not working (2)
    I created a new theme and it was working fine but after a few days, I realized some things weren't working. default_head_blocks.xml is no longer pulling in any css files that I include (both hosted and external) default.xml is not overwriting parent one. I'm not sure what is […]
  • Missing Sidebar (0)
    I inserted the following code into the Magento backend under Catalog/categories/custom design/custom layout update to hide my sidebar: /*DO NOT REMOVE THIS CODE - HIDES FILTERS FROM CATEGORY*/ <reference name="left"> <remove name="amshopby.navleft" /> <block […]
  • Magento 2 – Checkout – Payment methods not visible (1)
    I'm trying to extend checkout page, I copied the checkout_index_index.xml in my layout folder (vendor/theme/Magento_Checkout/layout) I change some thing in the file, now in the payment method I can't find method I set on the admin page. If I remove my custom layout file, the […]
  • how to define your own two different .phtml frontend pages in custom layout file in Magento? (1)
    I have created a module in which i have created a custom template file which i have successfully called now. And I want to create another template file in same folder but how do I define it in layout xml file ?
  • Fedex Shipping Methods add new method and ground method not showing up turning residential delivery (0)
    I am looking for how do i add new method "Home delivery evening" method in magento fedex there is no option in magento back end, Home delivery Option already available in frontend but my requirement is to display both methods. I am also looking for magento display ground method even […]
  • Fedex Shipping Methods add new method and ground method not showing up turning residential delivery (0)
    I am looking for how do i add new method "Home delivery evening" method in magento fedex there is no option in magento back end, Home delivery Option already available in frontend but my requirement is to display both methods. I am also looking for magento display ground method even […]
Magento 2 indexer not working in PHP 7 (7.0.4)
Automatically change shipping method when order is created

2 Comments on this article

  • User November 12, 2016

    The only way I found to solve the problem was duplicate the theme and give it a new name. Then use the new theme and it works.

    Reply

  • User November 12, 2016

    I just experienced this same problem but I found it ridiculous to have to remove the theme and add it again.
    So my default.xml seemed to be ignored, so I renamed the layout folder to see if that would change anything; it broke everything. Okay, so the layout folder is read and used by Magento, why wouldn’t the default? I emptied the file and started from scratch; all my changes were visible again!

    TL;DR – there was a typo in a statement (a missing closing tag) somewhere in the file. Rather then give an error, it discarded everything in the file. So whenever somebody finds him/herself in this situation; empty the file and put everything back line by line ’till you see the error!

    Reply

Add a comment

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax