I have three newsletters that appear on the registration form. If a user subscribes to just one they get receive multiple subscribe confirmation messages. They are only subscribed to one list in Campaign monitor.

The attached patch adds some logic to the success message so its only displayed for newsletters they actually subscribe to.

Comments

rsaddington’s picture

Version: 6.x-3.0-beta2 » 6.x-3.x-dev
crea’s picture

Since there's no list name in the message, one message should be enough in all cases. Why repeat it at all ?

crea’s picture

Title: Duplicate "You have been successfully subscribed." message when using multiple newletter lists » Subscribe only when checkbox is selected and don't show duplicate messages
crea’s picture

Title: Subscribe only when checkbox is selected and don't show duplicate messages » Don't show duplicate messages

Hmmm, there are many duplicated messages. It's actually better to keep the problems separated..

crea’s picture

Original patch in this issue could fix the problem partially, but it actually approaches it from the wrong side (IMHO). There are places where subscription functions are mistakenly called several times (e.g. #955056: Drupal message says "You have been successfully subscribed" even if you haven't) , so it's better to fix those places rather than to modify the subs./unsubs. functions.

Duplicate messages also show when there are subsequent subscription to several lists (which is a valid usecase), and the original patch does not address that.

crea’s picture

This patch uses simple approach to fix all duplicates. We can simple show each error/success message only once cause they are general and don't contain unique information.

cableman0408’s picture

Assigned: Unassigned » cableman0408
Status: Needs review » Closed (fixed)

The issue have been fixed in the development branch and is based on the patch. Thanks