Recently we upload our site to Production Server. In Developer Server all is apparently Ok. But, in production server, in Admin, when I go to Marketing > Email Templates, and I try to modify some Template or Add a New one, some times the page throw me to a white page with only the black words: "404 error: Page not found."

After some tests, I saw that it only occurs when the Template Content field has in his text instructions like {{var ...}} or {{trans ...}} When the text is Plain HTML, it is saved without problem. At same time, instructions like {{depend ...}} or {{if ...}} Neither do they cause problems. For now, it is only when the text have {{var ...}} or {{trans ...}}. For example:

{{trans "%customer_name," customer_name=$order.getCustomerName()}}

{{var formattedShippingAddress|raw}}

As I said, it only occurs in my production server, in developer server works fine. I tried to upload again all my vendor directory, but the result was the same.

I do some more tests, and the strange thing is, when the error occurs, it doesn´t enter to the method execute() in vendor\magento\module-email\Controller\Adminhtml\Email\Template\Save.php, it goes directly to the 404 page. But, why only occurs when the text have that instructions? I don´t understand.

Someone have any idea?

My Magento version is 2.1.1

  • What is the actual URL that you are on when you see the 404? – nikola99 Jun 21 '17 at 21:21
  • Hi nikola99, the url is like this: https://[Site's Domain]/admin/admin/email_template/save/id/2/key/4fdd379be11598a115bd571b35b4fd1184b05c0f9e84d7b266bdc99e161e6430/ – Eliacim DAVILA - CENSERE Jun 21 '17 at 22:23

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.