Widget not working
-
The widget do not subscribe adresses in the Mallet lists …
It doesn’t shows any message …
-
Hello Eduardo,
Could you please describe how you have configured Mailjet for WordPress module and Mailjet subscription widget? How you have tried to subscribe an addresses and you have discover that it didn’t work?
Looking forward for your feedback,
Thanks,
Mailjet team
Hello,
Thanks for your quick response.
I have configured mailjet in the configuration page with Api an Secrets keys. It can shows my lists and send eMails. Then, i have dropped the Malljet widget in my widget area. It show the form correctly but the forms doesn’t seems to work.
Yo can see the widget in this page (at the bottom of the right column) :https://www.prowinelanguage.com/cours-experiences/sejour-linguistiqueThanks,
Hello Eduardo,
Could you please precise which version of Mailjet for WordPress module you have installed? What is your PHP version?
We will need those details in order to reproduce the issue you have faced.
Thank you,
Mailjet team
PHP Version 5.4.45-0+deb7u2
Mailjet for wordpress : Version 3.2.5Thanks,
Thank you, we will investigate it and come back to you tomorrow morning with more details,
Mailjet team
Thanks a lot,
Hello,
We have reviewed the way our plugin works on your installation and it seems that there is a problem with the loading of Javascripts on you WordPress site.
You are using a jQuery plugin for migrating the old jquery code to newer versions, but it gives a warnings messages.
This is why the site is not loaded our javascript code at all. If everything was OK, you were supposed to have the following code in you HTML source if our javascript files are succesfully loaded by you WordPress installation :
<script type=’text/javascript’>
/ <![CDATA[ /
var WPMailjet = {“ajaxurl”:”http:\/\/localhost\/wordpress\/wp-admin\/admin-ajax.php”,”nonce”:”cbc0653671″,”loadingImg”:”http:\/\/localhost\/wordpress\/wp-content\/plugins\/mailjet-for-wordpress\/assets\/images\/loading.gif”};
var WPMailjet = {“ajaxurl”:”http:\/\/localhost\/wordpress\/wp-admin\/admin-ajax.php”,”nonce”:”cbc0653671″,”loadingImg”:”http:\/\/localhost\/wordpress\/wp-content\/plugins\/mailjet-for-wordpress\/assets\/images\/loading.gif”};
/ ]]> /
</script>
<script type=’text/javascript’ src=’https://localhost/wordpress/wp-content/plugins/mailjet-for-wordpress/assets/js/ajax.js?ver=4.3.1′></script>
<script type=’text/javascript’ src=’https://localhost/wordpress/wp-content/plugins/mailjet-for-wordpress/assets/js/mailjet.js?ver=4.3.1′></script>But this code is missing….
The main file in chagre with subscription widget actions is “wp-content/plugins/mailjet-for-wordpress/assets/js/ajax.js?ver=4.3.1” and it not seems to be loaded by you WP installation. The reason for this could be any occurrence of JavaScript error/s or broken WP installation.
Could you please check on your end?
Thanks,
Mailjet teamHi,
Thanks for your response.
In which php you adds the two scripts ? In mallet-class.php you register the scripts for the admin but I can’t see where you register the scripts for the front (in order to make some tests).Thank you,
Hi Eduardo,
You should check file mailjet-widget.php – which is in charge of our subscription Widget – displaying the form and adding required JavaScripts.
There is a function “widget()” which is called from the WordPress CMS on every occurrence of our widget on Front-end.
There is a code inside this function which adds all javascript files required by the widget. And it seems the WordPress doesn’t include these javascripts.The main javascript file needed by the widget is “assets/js/ajax.js”, which in widget() function is called as follow:
“wp_enqueue_script(‘ajax-example’, plugin_dir_url( FILE ) . ‘assets/js/ajax.js’, array( ‘jquery’ ));”
… where the last argument array(‘jquery’) means that we have jQuery dependency. And perhaps this is the problem as it seems there is some jQuery warnings on your site. Could you please update your jQuery code according your actual jQuery version and please not use the jQueri Migrate plugin to check if the problem will be resolved?
Thank you,
Mailjet teamHi Eduardo,
Is our advise help you? We have released a new subscription widget with multilingual support. So please check it out!
Thanks,
Mailjet team
Hi !
I don’t know why it doesn’t work but after an update it works correctly.
Cool news for the multilingual support of the plugin, I was just installing it in another site and I also need this.Thanks a lot for your help and your work!!
- The topic ‘Widget not working’ is closed to new replies.