1

I am having some trouble with the latest version of Magento (2.4.5-p1) , the latest version of MailChimp (103.4.50 and lib 3.0.35) and the latest version of Porto Theme.

After installating and activate the theme frontend show me:

Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'subscribe_popup.phtml' in module: 'Ebizmarts_MailChimp' block's name: 'porto_newsletter_popup'
``

Now my question is:
How the extension works and what elements of themes it overrides?

I think there are some elements of Subscribe module that are overridden and then the theme does not work.

Can someone help me please?

3 Answers 3

2

The correct thing that you have to do to resolve de issue in magento 2.4.6 is copy, all templates from porto

public_html/app/design/frontend/Smartwave/porto/Magento_Newsletter/templates

to mailchimp.

public_html/vendor/mailchimp/mc-magento2/view/frontend/templates

And fixes the problem

1

I had the same issue. I am using Magento 2.4.4

I resolved this issue. You just need to use

{{block class="Magento\Newsletter\Block\Subscribe" name="home.newsletter" template="footer.phtml"}}

instead of

{{block class="Magento\Newsletter\Block\Subscribe" name="home.newsletter" template="subscribe_form_footer.phtml"}}

Because Ebizmarts_MailChimp uses footer.phtml template

edit this file: public_html/app/design/frontend/Smartwave/porto/Smartwave_Porto/layout/default.xml

replace line 14 with this

0

This happens in magento2 when you migrate to the latest version i.e 2.4.5, it has some tightly coupled and strictly following structure in XML.

You need to configure and check that your XML template in HTML template is declared, which produces the error:

Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid `template file: 'subscribe_popup.phtml' in module: 'Ebizmarts_MailChimp' block's name: 'porto_newsletter_popup'`

As of Magento 2.4.3 HTML tags must have nested and closed properly to meet standards in JQuery 3.5.x for non-void elements including custom elements.

So you have to make sure all *.html has the correct open/close tags.

You are facing an issue with the XML file layout structure.

To resolve this, please make sure as of Magento 2.4.5, the XML structure is quite strictly identified:

Steps to reproduce:

  • The component path to HTML is correct, i.e., The path to the component's .html template. ui/form/field exists.

  • Every tag has an open and closed tag.

  • As of Magento 2.4.5, HTML tags must have nested and closed properly
    to meet standards in JQuery 3.5.x for non-void elements, including
    custom elements.

  • Please check your custom HTML element template
    My_Module/element/input contains proper HTML with open and closed
    tags to match the standards.

As in the latest release, the Magento KO engine is quite strict and complex with these things.

Also your theme porto and module Newsletter is not locating the template file that you define in the Block path.

'Ebizmarts_MailChimp' block's name: 'porto_newsletter_popup' ``

Make sure you have the correct template HTML located with subscribe module.

2
  • Hi and thanks a lot for your time! there is a problem: I don't have undestand wich file I must check, excuse me. Can you help me?
    – Antonio S.
    Commented Nov 29, 2022 at 11:13
  • Sure @AntonioS. let's discuss will help you in this. For Skype: jyotishina rajwani Commented Nov 29, 2022 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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