• Resolved frankomator

    (@frankomator)


    After updating the MailPoet software to 2.6.17 and sending a newsletter with MailPoet today, the links in the newsletter don’t work anymore.

    Accessing the archive page of the newsletter in a browser shows that the links are correct (and working). The problem seems to be related to the tracking ids, MailPoet is adding to the URLs when sending the newsletter. I’ve checked older newsletters. In the browser everything is okay, but after sending them, every clicked external link now leads to a “404 Not Found”.

    As it has worked with the former version of MailPoet, the problem might be related to the recent bugfix (“Enhanced redirection check in email URLs.”)?

    Any idea? Is it just me?

    Best,
    Frank

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

Viewing 15 replies - 1 through 15 (of 30 total)
  • Hi Frank, so you are saying that old ones aren’t working, just the new ones? I mean, just links contained in a new newsletter created after the update?

    Hi I’m seeing exactly the same problem.
    The link in my newsletter is going to
    404 error

    Link is : https://www.28it.com.au/?email_id=3&user_id=301&urlpassed=aHR0cDovL3d3dy5kZHVnLm9yZy9BZ2VuZGEuYXNwP3BhZ2VpZD00Mg%3D%3D&controller=stats&action=analyse&wysija-page=1&wysijap=subscriptions

    It appears to be missing a page name in the link?

    Can I roll back until there is a fix, or is there a hack I can do?

    Kind regards
    Marco

    Thread Starter frankomator

    (@frankomator)

    Both – neither the links in old newsletters nor the links in the new newsletter are working after the last MailPoet update. They work in the browser (archive) view but after sending the newsletter something went wrong with the links. Apparently adding the tracking ids to the URLs render them nonfunctional so the subscribers of the newsletter get dead links.

    I duplicated an old newsletter and sent it to me – the same problem.
    I’m installing MailPoet on a clean WP installation to check if the dead links problem can be reproduced.

    Best,
    Frank

    Thread Starter frankomator

    (@frankomator)

    I run some tests on a second installation (and re-checked with the first installation).

    Using static urls such as “https://www.thisismylink.com” everything works fine.
    But with dynamic links such as “https://www.thisismylink.com/?id=DW2015090” MailPoet replaces the original part after the “?” with its own tracking code (“mail_id=75&user_id=1086&urlpassed=W3ZpZXdfaW5fYn…”).

    This is new behaviour, introduced with version 2.6.17 and causes all dynamic links to break.

    Best,
    Frank

    The issue is caused by the check that takes place before the user is forwarded to the link encoded in the ‘urlpassed’ get parameter.

    Line 33 of controllers/front/stat.php :

    if (preg_match('/'. preg_replace('/\//', '\\/', $WJ_Stats->subscriber_clicked()) .'/', $email_object['body']) ||

    As you can see, preg_replace is used to convert $WJ_Stats->subscriber_clicked() (which is the decoded url from the ‘urlpassed’ parameter value) into a suitable regular expression that can be used to see if the url exists within the contents of the email.

    However, all it is doing is escaping forward slashes. Makes sense in a way – escape forward slashes since the regex delimiter is a forward slash. However, this doesn’t account for characters in the url which are also special regex characters – such as a question mark.

    To fix this, change line 33 to:

    if (preg_match('|'. preg_quote($WJ_Stats->subscriber_clicked()) .'|', $email_object['body']) ||

    Here, we use a pipe as a more effective delimiter for a regex designed to look for a URL, and we use preg_quote to escape any regex special characters.

    Works for me! Hopefully MailPoet will resolve this in the next update so that it my emails continue to work post update.

    We are already working on a fix for it! A new version will be released soon.

    Experiencing exactly the same issue!

    I am using Mandrill for sending. The links work fine in the web preview on my site but break down in the email message itself.

    Any ETA on when this will be resolved? I need to urgently send a campaign but the links break down.

    Might try to roll back to the previous version and see if the problem is resolved.

    I really love your product guys but how could you fail to test for something like that before pushing the update? This is basic QA.

    Hopefully, there won’t be such issues when the next major version (3.0) is finally released.

    Just rolled back to 2.6.16 and all the links work as expected. Definitely an issue with the latest update (2.6.17).

    Please fix ASAP.

    I’d say that after sending emails at all, the second most important thing for mailpoet to do is let the recipients of those emails click links in them to get to content on the WordPress site that sent the email.

    That an update including a bug in this functionality was pushed to everyone does seem like pretty poor testing, though as a developer I understand that bugs happen. But that a fixed release was not pushed within hours of reports of this fairly giant problem seems kind of… I don’t know… unconscionable.

    That this issue is sitting here unresolved three days later seems like some kind of communication from mailpoet developers to mailpoet users / customers (yes, I own mailpoet premium).

    How can I revert back to the previous version ? All the links in my newsletter today are broken and I need to fix this!!!

    I used this plugin Sophie. Worked like a charm:
    https://www.ads-software.com/plugins/wp-rollback/

    Thank you so much! That worked like a charm and I was able to send a corrected newsletter today ??

    Thanks Genmi!

    I was hoping that the fix was hours away, not days, but was not aware how to roll back. Just used wp-rollback and confirm I’m happy and the links work again!
    It still worries me that such an significant failure takes so long to fix!
    Cheers
    Marco

    The new version will be out this week.

    Hey MailPoet,

    Why did you mark this ‘resolved’ if the fix is not out YET?

    The correct practice should be:
    1. You push the fix
    2. Users confirm it works as expected and the issue is resolved
    3. You mark the ticket as resolved

    What’s going on with you guys? Did you forget how the WP community operates?

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘Links in sent Newsletter not working with MailPoet 2.6.17’ is closed to new replies.