Search code examples
content-management-systemoctobercmsoctobercms-plugins

Email Subscription plugin in octobercms not working


I used this plugin in CMSpage. When the subscribe button is clicked no action is performed and redirects to the same page in which the formSubscribe component is added. The users are not added to the subscribers' list either. I added the formUnsubscribe component to another page. The formProfile component is also added to the same page in which there is formSubscribe component. I can't understand what I am doing wrong. The process to add the plugin is also not clear in the documentation provided.

Here is the link to the plugin.

 <form name="form-subscribe-andradedev" id="form-subscribe-andradedev" data-request="formSubscribe::onAddSubscriber" data-request-update="'formSubscribe::alert': '#result'">
        <input type="email" class="form-control" name="email" placeholder="* Email" required>
        <input type="hidden" name="latitude" id="latitude">
        <input type="hidden" name="longitude" id="longitude">
    </form>

Solution

  • This seems to be a javascript issue. Try this checklist;

    • Insert a record from the plugin's back-end form and check the event Log for errors ( Settings >> Event Log ). Has the record being created ? Any Errors ?
    • Check you browser console to see if there are any Javascript errors. (Combiner file working and all dependencies included e.g jQuery..)
    • Add the October Ajax framework tags to your layout if you haven't. As you mentioned if the page is refreshing after form submission this is most likely the problem. e.g;

      <script src="{{ [
          '@jquery'
      ]|theme }}"></script>
      
      {% framework extras %} <!-- This tag is important -->
      
    • I haven't used this plugin but looking at the components I suggest you add each one to a separate CMS page because of the redirects. In this case remove the formProfile from the formSubscribe page and add it somewhere else.

    If none of the above solves the problem and there are no errors, you should maybe contact the plugin author for support or update your question to include all the code used.