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
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityWhen 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>
In your Live site if that is in Production mode, then please try to create below file in your custom module here..
app/code/Vendor/Module/view/adminhtml/layout/adminhtml_email_template_preview.xml
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">
<body>
<referenceContainer name="root">
<block class="Magento\RequireJs\Block\Html\Head\Config" name="requirejs-config"/>
</referenceContainer>
</body>
</page>
Then try to run all deployment command once and check.
Hope this will help you!