When i try to view the template in Live i am getting a blank screen but if try to view the template locally or on staging it works without any issues.

Can anyone give me a hint or any help idea to get this working


Using the Kishan code gives me a screen that says "Email Preview" at the Top, with the Magento copyright info underneath but no template content in 2.3.4. I stumbled across this code on git healthywebsites clintonwere that gave me the result I expected. Hopefully it can help somebody else.

<?xml version="1.0"?> <!-- /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <update handle="empty" /> <body> <referenceContainer name="root"> <block name="preview.page.content" class="Magento\Framework\View\Element\Template" template="Magento_Email::template/preview.phtml"> <block class="Magento\Email\Block\Adminhtml\Template\Preview" name="content" as="content"/> </block> </referenceContainer> </body> </page>

  • Dear, can you please help me? I have the same problem in Magento 2.3.4. Can you tell where do I need to add this code? please give some instructions. The url of git.healthywebsites is not working.. Please help. – Greay Apr 22 '20 at 17:52
  • app/code/Vendor/Module/view/adminhtml/layout/adminhtml_email_template_preview.xml – Ron Sayers Apr 23 '20 at 18:52

In your Live site if that is in Production mode, then please try to create below file in your custom module here..


Content for this file is..

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceContainer name="root">
             <block class="Magento\RequireJs\Block\Html\Head\Config" name="requirejs-config"/>

Then try to run all deployment command once and check.

Hope this will help you!

  • Custom module for this layout file? and what is this xml file do? – jibin george Feb 5 '20 at 11:12
  • You can add this in your backend theme or also in your any custom module's adminhtml layout. I think you're getting JS error, and this will fix your issue. – Kishan Savaliya Feb 5 '20 at 11:14
  • I mean why is the production mode breaking the JS my live is on production – jibin george Feb 5 '20 at 11:16
  • 1
    Yes, If you will add above XML file then you will not get this error again. Above code will include that JS file there and you can see preview of your email template. – Kishan Savaliya Feb 5 '20 at 12:54
  • 1
    thank you, I will check this now – jibin george Feb 5 '20 at 12:55

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.