I copy this template from


There's no js console error and any other error on server log. Subscribe is not working (email id not saved on admin panel). how to tackle it.it doesn't show any message alert.

my newsletter template in

mynamespace/mytheme/Magento_Newsletter/templates/ newsletter-footer.phtml

<section class="signup-section">
    <div class="container">
        <div class="signup-container clearfix">
            <article>  <span>
                <h3>Sign Up For Newsletter</h3>
                <p>Be the First to Know. Sign up to newsletter today</p>
                </span> </article>
                <form class="form subscribe"
                      action="<?php echo $block->getFormActionUrl() ?>"
                      data-mage-init='{"validation": {"errorClass": "mage-error"}}'

                            <input name="email" placeholder="<?php echo __('Enter you email address here...'); ?>" type="email" id="newsletter"
                                   data-validate="{required:true, 'validate-email':true}"/>
                            <button class="action subscribe primary" type="submit">


        <!--end of div signup-container-->
    <!--end of div container-->


<referenceContainer name="main">
        <referenceContainer name="container.global" htmlClass="someotherclass"  >
            <block class="Magento\Framework\View\Element\Template" name="newsletter" template="Magento_Newsletter::newsletter-footer.phtml"/>


showing on homepage and validate email also enter image description here

enter image description here

  • The folder name should be "Magento_Newsletter" instead of "Magento-Newsletter".
    – kunj
    Jun 14, 2018 at 14:42
  • 1
    @kunj spell mistake Jun 14, 2018 at 14:53
  • This template is calling on frontend or not? Because you have changed the template name. Did you call the new template name from xml? If yes then please post the xml code on your question. Jun 14, 2018 at 15:15
  • Can you update the xml code? Jun 14, 2018 at 15:22
  • @SukumarGorai updated question ! Jun 14, 2018 at 15:27

2 Answers 2


Use below xml code instead of yours:

<referenceContainer name="main">
    <referenceContainer name="container.global" htmlClass="someotherclass"  >
        <block class="Magento\Newsletter\Block\Subscribe" name="newsletter" template="Magento_Newsletter::newsletter-footer.phtml"/>
  • Happy to Help!. Jun 14, 2018 at 15:43
  • Hi @ Sukumar Gorai, I need your help? Mar 7, 2019 at 5:24
  • Post your question please. Mar 7, 2019 at 7:13
  • Hi @ Sukumar Gorai, I have 2 years experience in Magento e-commerce website. But I don't have knowledge on extension development. So, I want to learn magento2 coding. Please suggest me any tutorials. Mar 7, 2019 at 12:16
  • Hi @ Sukumar Gorai, Could you please help me? Mar 7, 2019 at 12:29

You should use the right path for you override and place the template in


You can also check your code again and compare it with the original code in the vendor package.

  • I compare code . Is any other file I need to include ?? Jun 14, 2018 at 15:10

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.