0

I have copied my Magento 2 website from production to a:

Local Environment:

  • Ubuntu 20.04.4 LTS
  • Apache 2.4.41
  • MySQL Version 15.1 Distrib 10.5.16-MariaDB
  • PHP 7.4.30

in the normal way:

  • Copied all Magento files to my new webroot
  • Created a new database and copied the production database to it
  • Adjusted app/etc/env.php and core_config_data accordingly
  • Ran the necessary Magento commands

I have a working website, except for one thing: the homepage blocks are not displaying. Header and footer are there but not the custom blocks which should be loaded as they are on the production site.

the cms_index_index.phtml code is good:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
    <!-- <meta name="google-site-verification" content="" /> -->
    <meta name="google-site-verification" content="" />
    </head>
    <body>
        <referenceContainer name="main" htmlTag="div" htmlClass="column main" />
        <referenceContainer name="content">
                        <block class="Magento\Framework\View\Element\Template" name="test" template="Magento_Cms::homepage.phtml"></block>
                </referenceContainer>
    </body>
</page>

But the 6 blocks created in the Magento admin and enhanced by the homepage.phtml in the templates directory do not display.

I tested an intentional error in cms_index_index.xml, flushed, re-compiled, no errors logged. I tried switching themes, saved, and back again. There are no JavaScript errors in the console other than a font not being found and there's nothing relevant in system.log, exception.log or apache2.log.

1
  • you might start by checkout the template homepage.phtml is correctly loaded and found, for instance it could be permission issues where your template cannot be read.. Aug 9 at 19:05

0

Your Answer

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

Browse other questions tagged or ask your own question.