1

I have a strange problem. In our custom child-theme we have some simple layout files, for example removing the wishlist links and sidebar or moving page title, category image, etc into the content container. This example file is located at app/design/frontend/MYCOMPANY/MYTHEME/Magento_Catalog/layout/catalog_category_view.xml

and it contains the following:

<?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>
    <!-- move the title, category descr., category image and cms block into the content container -->
    <referenceContainer name="content">
        <block class="Magento\Theme\Block\Html\Title" name="page.main.title" template="Magento_Theme::html/title.phtml" />
        <block class="Magento\Catalog\Block\Category\View" name="category.image" template="Magento_Catalog::category/image.phtml" />
        <block class="Magento\Catalog\Block\Category\View" name="category.description" template="Magento_Catalog::category/description.phtml" />
        <block class="Magento\Catalog\Block\Category\View" name="category.cms" template="Magento_Catalog::category/cms.phtml" />
    </referenceContainer>

</body>

This works locally without any problems.

However, on the server this does not work.

Can anyone think of any reason as to why? Our local docker container is the same php, apache etc version as on the server.


Follow-up edit:

After various scenarios and testing on a fresh install, we managed to pinpoint this issue to something in our database. Exactly what setting caused it is unclear for now. I'll update it if I find the setting.

0

Can you rule out caching?

Flush all caches, including Varnish if possible.

The only reasons I can think of is either caching or deployment issues, or environment configurations such as case sensitivity. If it was a code issue it shouldn't work locally either.

  • Did that but not worked. – zed Blackbeard Sep 6 '17 at 15:21
  • Hi Ben, when deploying we run through all commands setup:upgrade, cache:clean, cache:flush, setup:di:compile, indexer:reindex, setup:static-content:deploy etc ... I also tried deleteing the cache files directly on the server and running the the static file deployment again - nothing changed. I also tried disabling, re-enabling our theme, custom modules and so forth. – tecjam Sep 6 '17 at 15:22
  • Seems rather strange, and if you view the file directly on the server it matches what you expect? – Ben Crook Sep 6 '17 at 15:25
  • Yes, we use git for deployment so I know the server is at the exact same commit. I double checked the files in question, they are all there and the same. =/ – tecjam Sep 6 '17 at 15:33
  • 1
    It turned out to be something in the database, exactly what is still unclear at this point. Thank you for your input. – tecjam Sep 7 '17 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.