Support #11175
closedunsubscribe action not working with Tribulant newsletter plugin
0%
Description
Julie Van Peteghem reports that on her site - https://wlteaching.commons.gc.cuny.edu - the unsubscribe action is not working. Here is the request url - https://wlteaching.commons.gc.cuny.edu/mailing-list/?method=unsubscribe&wpmlhistory_id=7&wpmlsubscriber_id=5&wpmlmailinglist_id=2&authkey=e4da3b7fbbce2345d7772b0674a318d5
When I run it in a debugger, it does seem to throw a javascript error.
I installed the plugin on a test site, created a couple subscribers, sent a newsletter, and clicked on the unsubscribe link in the newsletter and it worked for me.
Files
Updated by Boone Gorges over 5 years ago
- Status changed from New to Reporter Feedback
Scott, could you please give me more information on how to debug this issue? The request URL you've given - where did it come from? Is it from an email sent to a user? Does it come through in the footer of a sent newsletter, or something like that? I'm wondering specifically because the URL that you received has a parameter called "authkey", and I have the feeling that it's a one-time use key that expired by the time that you (and maybe the reporter?) tried to use it.
Did you manage to note the specific JavaScript error you saw when testing?
Updated by scott voth over 5 years ago
Hi Boone -
Julie provide the request url. It came from the link "unsubscribe" at the bottom of a sent newsletter. The javascript error was this:
Source map error: request failed with status 404 Resource URL: https://wlteaching.commons.gc.cuny.edu/wp-includes/js/jquery/jquery.form.min.js?ver=4.2.1-1.14.7 Source Map URL: jquery.form.min.js.map
I hope this helps. As I said, it works okay on my test site.
Updated by Boone Gorges over 5 years ago
Thanks, Scott. I think that the JS error is unrelated.
Could you please outline in some more detail how this is supposed to work? When you click the Unsubscribe link, should you be immediately unsubscribed? If so, what page are you led to, and what message do you see? Or, when clicking the link, are you led to a page where you see a form that lets you confirm that you're unsubscribing? I am unfamiliar with the way the plugin is intended to operate, and I'm confused by the fact that there appears to be an unrendered shortcode on the https://wlteaching.commons.gc.cuny.edu/mailing-list/?method=unsubscribe&wpmlsubscriber_id=5&wpmlmailinglist_id=2&authkey=e4da3b7fbbce2345d7772b0674a318d5 page.
Updated by scott voth over 5 years ago
- File newsletter config.png newsletter config.png added
Hi Boone - I got Julie to make me an admin of the site. I added you and me to the Default List. I created a test newsletter and sent it to the Default List of emails (just you and me). You should have gotten the email. On this newsletter there is the link to unsubscribe. When I try to unsubscribe it just redirects me to the Mailing list page, but does not unsubscribe.
The unrevised shortcode on that page is not related - I think Julie was playing around with that. That shortcode needs to be in the newsletter. (I put it into my newsletter.)
When I do this on my site, the unsubscribe goes first to a confirmation page. This is controlled in Newsletters>>Configuration>> second tab - Subscriptions --> Unsubscribe Behavior.
See attached.
Updated by scott voth over 5 years ago
"unrevised" shortcode should be "unresolved" shortcode
Updated by scott voth over 5 years ago
I do see this error related to Google Analytics
content-ads.js loaded: about:blank
?method=unsubscribe&wpmlhistory_id=10&wpmlsubscriber_id=8&wpmlmailinglist_id=1&authkey=c9f0f895fb98ab9159f51fd0297e236d:929 GET https://www.google-analytics.com/analytics.js net::ERR_BLOCKED_BY_CLIENT
(anonymous) ?method=unsubscribe&wpmlhistory_id=10&wpmlsubscriber_id=8&wpmlmailinglist_id=1&authkey=c9f0f895fb98ab9159f51fd0297e236d:929
?method=unsubscribe&wpmlhistory_id=10&wpmlsubscriber_id=8&wpmlmailinglist_id=1&authkey=c9f0f895fb98ab9159f51fd0297e236d:930
(anonymous)
?method=unsubscribe&wpmlhistory_id=10&wpmlsubscriber_id=8&wpmlmailinglist_id=1&authkey=c9f0f895fb98ab9159f51fd0297e236d:1 Unchecked runtime.lastError: The message port closed before a response was received.
content-tss.js:2 content-tss.js loaded: about:blank
VM90:7
Updated by Boone Gorges over 5 years ago
Thanks, Scott. Have you confirmed that the problem exists elsewhere on the Commons? There are so many ways that this plugin can be configured that I'm unsure whether it's a bug in the plugin, an incompatibility with other plugins installed on the site, or a configuration error.
Could you please take screenshots, or describe in bullet points, what happens during a successful unsubscribe clickthrough on your own site? What URL are you sent to first? What does the screen look like? Is more action required, like checking a box or submitting a form? Do you see a success message of some sort?
I'm looking at the code to try to reproduce the proper logic, and from what I see, all unsubscribe requests should go through the newsletters_management shortcode, not newsletters_subscribe. But again, I may be understanding the way that the plugin is supposed to work.
Updated by Boone Gorges over 5 years ago
Scott and I have worked through this a bit over email and ruled out some possibilities.
I think I found the configuration error at the root of the problem. At https://wlteaching.commons.gc.cuny.edu/wp-admin/admin.php?page=newsletters-settings-subscribers, click the Advanced button to reveal all settings. There's a field labeled "Management Post ID", which was empty. As such, the plugin didn't know where to lead users when clicking Unsubscribe and Manage from the email. I filled it in with the post ID of the manage-subscriptions page that Scott created, and it appears to have fixed the problem. Scott, could you verify?
I don't know why this originally happened. My guess is that the plugin auto-created the page(s) it needed, but then the admin deleted and recreated them; the plugin then didn't know about the recreated pages.
Updated by scott voth over 5 years ago
- Status changed from Reporter Feedback to Resolved
Awesome Boone! That did the trick. I will let Julie know.
Updated by Boone Gorges over 5 years ago
- Target version set to Not tracked
Thanks for working through this with me!