• Resolved nrmn

    (@nrmn)


    Hey,

    since one of the latest Updates, i get a lot of angry mails from subscribers, telling me the unsubscribe link doesn’t work. It ends up with a 404 page.

    I did deactivate all plugins one by one and tested the unsubscribe link to see if there is a conflict, but it seems, there is no conflict.

    Then i saw the Changelog and found that there has been a similar problem in 2012 wich was fixed by an Update:

    2.0.3 – 2012-06-26

    fixed …

    fixed on some server unsubscribe page or confirmation page redirecting to 404

    Is it possible that this old problem is coming up again?

    Or do you have some other proposals how to find the source of this problem?

    I would love to hear from you very soon =)

    Greets from germany

    Norman

    https://www.ads-software.com/plugins/wysija-newsletters/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Have you updated to the latest version 2.6.18 where we fixed this issue?

    Thread Starter nrmn

    (@nrmn)

    Yes, i have updated to version 2.6.18.

    What i also have to add to this post ist that the confirmation link works fine! Only unsubscribing causes problems. And the resulting url is not a short one. It has a lot of parameters.

    I would be so glad if you fix this soon.

    Norman

    I have the same issue on version 2.6.18.

    Looks like we have a little problem with the latest release, can you guys try this temporary solution:

    Here’s the patched file for the links issue: stats.zip

    Just replace this file over the existing one at wp-content/plugins/wysija-newsletters/controllers/front/stats.php

    Thread Starter nrmn

    (@nrmn)

    TANK YOU!

    This patch works for me. Unsubscribe link is now redirecting to the unsubscribe page =) (And confirmation and other newsletter links are also working fine)

    I tried to figure out the difference between the new stats.php and the old one but couldn’t find it. What has caused the problem?

    Thanks that works!

    Thread Starter nrmn

    (@nrmn)

    Good job!

    That isn’t the complete solution for everyone, if this doesn’t work for you, please read this: https://www.ads-software.com/support/topic/links-in-sent-newsletter-not-working-with-mailpoet-2618?replies=11#post-7503890

    We are working on a new version to fix this once and for all.

    I just installed this plugin this morning and have now run into this 404 issue. The patch doesn’t fix the problem for me. This is the error I get when clicking on the unsubscribe link in the test email:

    Warning: preg_replace() expects at least 3 parameters, 2 given in /home/photogra/public_html/stage/wp-content/plugins/wysija-newsletters/controllers/front/stats.php on line 32

    Warning: Cannot modify header information – headers already sent by (output started at /home/photogra/public_html/stage/wp-content/plugins/wysija-newsletters/controllers/front/stats.php:32) in /home/photogra/public_html/stage/wp-includes/pluggable.php on line 1196

    When do you expect to have this fixed?

    Well that fix made it worse.
    was getting the 404 page, now getting the error

    Warning: preg_replace() expects at least 3 parameters, 2 given in /home1/body/public_html/mg.com.au/en/wp-content/plugins/wysija-newsletters/controllers/front/stats.php on line 32

    Warning: Cannot modify header information – headers already sent by (output started at /home1/body/public_html/mg.com.au/en/wp-content/plugins/wysija-newsletters/controllers/front/stats.php:32) in /home1/body/public_html/mg.com.au/en/wp-includes/pluggable.php on line 1207

    customers complaining.
    We need a fix that works..

    I also get the 404 page when I try to unsubscribe – BUT I also get it when I try to open the newsletter in my browser.

    When do you think it will be solved? Days? Weeks? Months?

    Thank you :o)

    replace the code lines in the stats.php file with the lines listed below.

    $url = $this->encode_url($WJ_Stats->subscriber_clicked()); // line 30
    $external_url = htmlentities($WJ_Stats->subscriber_clicked()); // line 31 escape HTML characters (that’s how URLs are saved in the DB)
    $external_url = preg_replace(‘!/?\?utm.*!’, ”, $external_url); // line 32 remove anything that starts with ?utm or /?utm
    $internal_url = htmlentities(get_home_url()); // line 33
    $model_email = WYSIJA::get(’email’, ‘model’); // line 34
    $email_object = $model_email->getOne(false,array(’email_id’ => $_REQUEST[’email_id’])); // line 35
    if (preg_match(‘/’. preg_quote($external_url, ‘/’) .’/’, $email_object[‘body’]) || // line 36
    preg_match(‘/^’. preg_quote($internal_url, ‘/’) .’/’, $url)) { // line 37
    do_action(‘mpoet_click_stats’, $WJ_Stats); // line 38
    $this->redirect($url); // line 39
    } // line 40
    header(‘HTTP/1.0 404 Not Found’); // line 41
    echo ‘<h1>404 Not Found</h1>’; // line 42
    echo ‘The page that you have requested could not be found.’; // line 43

    wealthy, your amended code fixed the problem with the unsubscribe links, but now when I go to send the newsletter it sends me to a 404 page from the dashboard.

    This is so frustrating! When is the developer going to fix this?

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Unsubscribe link leads to 404 page’ is closed to new replies.