Possible Jquery Problem

I am having many issues with this plugin, using send the plugin only sends one email at a time and says ‘ok’

Is this what is meant to happen or could it be a jquery issue, what would be the point of the progress bar if it was only sending one at a time?

I am using a twenty eleven child theme and have a membership plugin which uses jquery as well, when I activate e-newsletter it messes up the layout of the membership plugin.

I am reluctant to deactivate the membership plugin as there are many settings that will be lost and members will not be able to login as the pages have re-directs.

Before the plugin is activated:

After the plugin is activated:

UPDATED:

I have tested in a vanilla twenty eleven theme, with all plugins de-activated and three users, the progress bar worked just fine, it looks like the plugin is affected by the jquery of other themes and plugins.

My childtheme has google font script, 1040 css script, google+1 script, and an admin options ui script, I will check these one by one over the weekend, the membership plugin layout would not be a problem as I would just deactivate e-newsletter after each batch!

If this cannot be addressed, then I will have to look for another newsletter plugin or external mail website service.

Regards

David

  • DavidM
    • DEV MAN’s Mascot

    Hi Adeptris,

    The Newsletter plugin loads all its javascript only on its own admin pages, so at least those scripts should not affect anything else.

    However, it does enqueue jquery the standard WordPress way and I wonder if maybe that’s conflicting with your membership plugin? If your membership plugin is loading a different version of jquery, that could cause problems such as what you’re experiencing.

    Plugins normally store their settings in the database itself, so that when they’re deactivated, then reactivated, all the settings are intact. Is that not the case with this membership plugin?

    If it does store its settings in the database, it should be safe to deactivate the plugin to see if that’s where the send issue’s coming from with the newsletter.

    Could you take a look into that?

    Cheers,

    David

  • Adeptris
    • Design Lord, Child of Thor

    Hi David,

    I have tested in a different database a vanilla twenty eleven theme, with all plugins de-activated and three users, the progress bar worked just fine, it looks like the plugin is affected by the jquery of other themes and plugins.

    I activated my childtheme which has google font script, 1040 css script, google+1 script, and an admin options ui script, I will check these one by one over the weekend, the membership plugin layout issue would not be a problem as I would just deactivate e-newsletter after each batch send!

    If this cannot be addressed, then I will have to look for another newsletter plugin or external mail website service.

    Regards

    David

  • Adeptris
    • Design Lord, Child of Thor

    Hi David,

    I have isolated the send problem, my theme has a file (default.php) that loads the default theme options, if I remove this file the send works just fine, add it back and the send only sends one file at a time.

    Could you ask the devs to look at the default.php options and functions to see if there is a conflict, if not it might be a variable?

    http://pastebin.com/DSWR8jBW

    Array Variables populated in functions.php the plugin might be using one of these like

    global $variable;

    Here is the list:

    $theme_css = elevenforty_list_styles();
    $theme_cats=array();
    $the_cats = get_categories();
    $cat_meta = get_option("elevenforty_cat_meta");
    $cat_children = get_option('category_children');
    $top_cats = elevenforty_top_categories();
    $cat_detail = elevenforty_categories();
    $widget_args = array();
    $exclude_posts = array();
    $settings = get_option( 'elevenfourty_theme_options' );

    What a journey!

    David

  • DavidM
    • DEV MAN’s Mascot

    Hi Adeptris,

    Glad you found that! It’s a bit of a tough one at this point because without the theme options, the theme is likely not loading various sections that the problem point could exist in.

    I wonder if the theme itself loads a custom version of jquery or does something strange with jquery. Could you check to see if there’s any jquery files actually included in the theme?

    Also, could you let us know what theme this is? Perhaps someone around here might have a copy to look at.

    Cheers,

    David

  • Adeptris
    • Design Lord, Child of Thor

    Hi David,

    It is a child theme that I have created, I have removed every file, and remarked code then added back everything one bit at a time.

    The newsletter sends fine until this file gets added back, so I am sure that the problem will be with one of the variables being populated being called as a global, or the function:

    get_theme_admin_options()

    UPDATED:

    Think I have found it!

    class Email_Newsletter {

    var $plugin_dir;
    var $plugin_url;
    var $settings;
    var $tb_prefix;

    Using the var $settings; which is already populated by the theme, many theme authors use this variable name, I am not sure of the php scope using the prefix ‘var’, I have not seen it used much, and google did not make it clear.

    HTH

    David

  • DavidM
    • DEV MAN’s Mascot

    Hi David,

    You’re right, sounds perfectly reasonable. I’ve asked the developer to take a look into this, perhaps he might have an easy solution without having to hack the plugin or your theme.

    For now though, you could probably do a bulk search/replace of that $settings variable in either your theme or the plugin.

    Cheers,

    David

  • Adeptris
    • Design Lord, Child of Thor

    Hi David,

    As E-Newsletter is affecting my Membership Plugin as well as being upset by my theme, I will put a hold on the newsletters and wait to see what happens after the next plugin update.

    The problem with the Magic Members Plugin vs E-Newsletter Plugin is they both use the ui- prefix like ui-tabs, so the Newsletter is resetting the memebership styles, and it looks like my theme uses the same variable names as well, I will contact the membership plugin authors as well.

    If the devs prefix functions and variables with enl_ and style elements with enl- it would likely stop most conflicts, I will re-visit the child theme and prefix all my variables, functions and styles.

    Not sure if the ui- styles can be loaded only when the Newsletter pages are loaded?

    B.T.W.

    The php 4 ‘var’ keyword has been deprecated in php 5.3.

    My experiences with premium themes and plugins WordPress content has not been positive, purchases not only from this website, with no way to ‘try before you buy’ means that every purchase is a gamble.

    The reason that I purchased this plugin was because at a WordPress London meetup several people reccommended it as one plugin worth the money!

    From all the paid content I have tried, I am only currently using one paid Membership plugin.

    Regards

    David

  • Adeptris
    • Design Lord, Child of Thor

    Hi Andrey,

    The css is now fixed and does not conflict with the other plugins.

    It is still only sending one email at a time, this is when I load the theme defaults, I think it has something to do with the variable names and scope, but I have not been able to find which variable is causing the issue yet.

    I will try to investigate tomorrow, however with twenty eleven it works fine, with a simple twenty eleven child theme it works fine.

    When I load the variable arrays in the post/link above for my custom child theme it breaks the sending of the newsletters, that is why I think it is to do with a conflicting variable in the plugin.

    It is nearly there, if the send can be fixed and bulk add members to groups it will suit most small membership sites, and I will gladly promote it in a post, with nearly 60% of my traffic coming from Google.

    Regards

    David

  • Adeptris
    • Design Lord, Child of Thor

    Hi Andrey,

    The problem is still there with the send, it is not JQuery but I think to do with the variables, we are both using the same names.

    See my posts above, when I load the defaults the error happens.

    http://pastebin.com/DSWR8jBW

    These are globals used by my theme, I have not had a chance to re-work it yet, when I isolate the problem I will let you know.

    $theme_css = elevenforty_list_styles();
    $theme_cats=array();
    $the_cats = get_categories();
    $cat_meta = get_option("elevenforty_cat_meta");
    $cat_children = get_option('category_children');
    $top_cats = elevenforty_top_categories();
    $cat_detail = elevenforty_categories();
    $widget_args = array();
    $exclude_posts = array();
    $settings = get_option( 'elevenfourty_theme_options' );

    Regards

    David

  • Andrey
    • The Incredible Code Injector

    Hi David,

    I don’t think so – because my variable it’s variable of plugin’s class – it’s different name space.

    Anyway I think it will be better if I will look it myself.

    Are you can give me your theme?

    you can create .zip file of your theme and give me link for download it from contact form on page:

    https://premium.wpmudev.org/contact/

    you must write in Subject [for Andrey] – don’t worry no one will see it except me.

    thanks

  • Andrey
    • The Incredible Code Injector

    Hi Adeptris,

    I’m not sure but I think I found the problem.

    Why not sure because I had another problem with theme – I can’t see the send page.

    But any way it’s maybe here.

    please do:

    in your theme in the file includesdefaults.php on 412 line after ‘?>’ you have the extra sign (space) – you must delete it.

    I will wait result.

    thanks.

  • Adeptris
    • Design Lord, Child of Thor

    Hi Andrey,

    Many thanks, that was the issue, I cannot believe it was that simple, I am rewriting the whole theme from start, so I will keep a note on that one, I am normally very good at tracking bugs!

    The feature to block add members to a group is one I am waiting for, but I will be sending out a newsletter this weekend, now I can send to all and will mention the plugin, in the newsletter and a post.

    Kind Regards

    David

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.