• Resolved jbd7

    (@jbd7)


    Hi Matt,

    I installed subscribe2 yesterday and made tests. I use it only in a page, not via a widget, and with no ajax.

    Everything is working fine functionally, I like it and thank you.

    There is however 1 glitch I can’t figure out: when a email ID is subsribed, the form successfully changes itself into “…mail on its way …”. The mail arrives in the inbox with the confirmation link. But on cliking the link, I am sent to the form page, with “Subscription Confirmation” in big and the subscription form below, instead of the “You have successfully subscribed!” message. The process works well and the email is added in the list of subscribers.

    It is the same problem for unsubscription.

    I checked the page code after clicking a confirmation link, and can actually find the confirmation message at the top of the code:

    <meta name="description" content="You have successfully subscribed!" />

    Would you please have an explanation for this?

    Thanks,

    jb

    http://wordpress.org/extend/plugins/subscribe2/

Viewing 6 replies - 1 through 6 (of 6 total)
  • @jb,

    I can’t be 100% sure but I suspect it’s a plugin issue and here’s why:

    The confirmation message (title and content) is applied by using the WordPress filter API, the title hooks into ‘the_title’ and the content hooks into ‘the_content’.

    Now, both of these hooks should only be called from in ‘the_loop’, which means when WordPress is cycling through your posts trying to find which to display on the browser screen. Subscribe2 only filters once to prevent unexpected results.

    Now, it seems that on your site, perhaps a plugin is running to gather some information via ‘the_content’ hook and push that into your meta description tag.

    I’d argue that calling ‘the_content’ there is calling it too early and is a bad idea from WordPress coding standards.

    I hope some of that makes sense. The easy way to check is to disable all of your other plugins and try again. If the message displays correctly, reactivate your plugins one at a time to find the plugin that calls ‘the_content’ too early.

    Thread Starter jbd7

    (@jbd7)

    Hi Matt,

    Thanks for your quick reply. I deactivated all other plugins and it still didn’t behave at it should.

    I am using Arras theme. Are you aware of problems with it?

    jb

    @jb,

    Fortunately Arras is open source, and you are right, it is the cause of the problem.

    Have a look in the arras theme folder in the library/template.php file. In there you’ll find this function:

    function arras_document_description() {
    if ( class_exists('All_in_One_SEO_Pack') || class_exists('Platinum_SEO_Pack') ) return false;
    
    if ( is_single() || is_page() ) {
    if ( have_posts() ) {
    while( have_posts() ) {
    the_post();
    echo '<meta name="description" content="' . get_the_excerpt() . '" />';
    }
    }
    } else {
    echo '<meta name="description" content="' . get_bloginfo('description') . '" />';
    }
    }

    At the end of that function I think you need to add wp_reset_query(); so the loop is reset. That should fix it.

    @jb,

    I’ve logged this as an issue on the Arras Theme github site also:
    https://github.com/zyml/arras-theme/issues/75

    Thread Starter jbd7

    (@jbd7)

    Thanks! That’s exactly that.

    Except that adding wp_reset_query();before the function end didn’t have any effect. On the other hand, I have the SEO plugin by Yoast which is not considered by Arras, so I could exit the function at the beginning.

    @jb,

    Exiting that function earlier and bypassing the code altogether should work also. It will mean that you done get the content generated by that function but perhaps that’s okay.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Subscribe2] confirmation link sending to subscription form’ is closed to new replies.