CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • mailing list: contact removed from Group can't re-subscribe
Pages: [1]

Author Topic: mailing list: contact removed from Group can't re-subscribe  (Read 1431 times)

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
mailing list: contact removed from Group can't re-subscribe
May 22, 2011, 10:27:49 am
<< I posted this on a different board - http://forum.civicrm.org/index.php/topic,20020.0.html - but I now think it's better placed here - sorry about that >>

When a contact who is manually (by admin) removed from a Mailing List Subscription Group [eg in error] tries to re-subscribe himself to this Mailing List Subscription Group using:
civicrm/mailing/subscribe?reset=1

He gets: a "You are already subscribed in Newsletter Subscribers, your subscription is Removed."

That doesn't get him back on the list. I reproduced this on drupal.demo.civicrm.org - I think this happens b/c the Contact isn't permanently removed but is parked w/ status Removed. Is there a way for subscribers to re-subscribe themselves or does Admin have to do this?

Thanks,

-- Karin

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: mailing list: contact removed from Group can't re-subscribe
May 22, 2011, 12:05:30 pm

This seems like a bug. would be great if you can investigate and create a patch to fix it. The code is here:

CRM/Mailing/Event/BAO/Subscribe.php, function commonSubscribe

lobo



A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Re: mailing list: contact removed from Group can't re-subscribe
May 22, 2011, 12:22:03 pm
Will give it a go - will try my best. Looks like a good opportunity to learn more about this amazing project. -- Karin

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Re: mailing list: contact removed from Group can't re-subscribe
May 22, 2011, 02:36:35 pm
Are there CiviCRM built-in SPAM control settings that "govern" how often one can self-(re)subscribe to a Group?

I just managed to successfully self-re-subscribe to a Group admin had kicked me out off using Chrome - but trying to replicate this [happened to be with Safari and Firefox] I got bumped back to the home page of the site when I hit the subscribe button - now with Chrome [testing for possible browser issue] - I'm being bumped back to the home page of the site as well when I hit the subscribe button.

Do you suppose it's possible that I got into trouble self-re-subscribing b/c I was testing my subscribe to newsletter form with different browsers (and as a result un/re-subscribing a lot)? If that is the case then it's not a bug - perhaps it would just need a clear message as to why one was not allowed to self-subscribe.

-- Karin

Micah Lee

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 4
  • CiviCRM version: 4.1.0
  • CMS version: Drupal 7
  • MySQL version: 5.1.49
  • PHP version: 5.3.3
Re: mailing list: contact removed from Group can't re-subscribe
September 02, 2011, 01:18:04 pm
I'm running into this same problem. If someone is subscribed to groups and then they unsubscribe, they can't re-subscribe on their own anymore. The error messages look like "You are already subscribed in Action Alert, your subscription is Removed."

I searched the bug tracker for this bug but couldn't find it. Has it already been submitted?

Micah Lee

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 4
  • CiviCRM version: 4.1.0
  • CMS version: Drupal 7
  • MySQL version: 5.1.49
  • PHP version: 5.3.3
Re: mailing list: contact removed from Group can't re-subscribe
September 02, 2011, 01:23:17 pm
BTW, I have fixed this problem with this simple patch:

Code: [Select]
diff --git a/sites/all/modules/civicrm/CRM/Mailing/Event/BAO/Subscribe.php b/sites/all/modules/civicrm/CRM/Mailing/Event/BAO/Subscribe.php
index c1a3def..2bc6f53 100644
--- a/sites/all/modules/civicrm/CRM/Mailing/Event/BAO/Subscribe.php
+++ b/sites/all/modules/civicrm/CRM/Mailing/Event/BAO/Subscribe.php
@@ -349,7 +349,7 @@ SELECT     civicrm_email.id as email_id
         $success = null;
         foreach ( $groups as $groupID ) {
             $title = CRM_Core_DAO::getFieldValue( 'CRM_Contact_DAO_Group', $groupID, 'title');
-            if ( array_key_exists( $groupID, $contactGroups ) ) {
+            if ( array_key_exists( $groupID, $contactGroups ) && $contactGroups[$groupID]['status'] != 'Removed' ) {
                 $group[$groupID]['title']  = $contactGroups[$groupID]['title'];
                 
                 $group[$groupID]['status'] = $contactGroups[$groupID]['status'];

I can attach this to an issue on issues.civicrm.org too -- I just want to make sure I don't make a duplicate issue first.

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Re: mailing list: contact removed from Group can't re-subscribe
September 02, 2011, 01:29:14 pm
No, I've not submitted it as I wasn't able to consistently reproduce this behavior. Thanks for this.

-- Karin

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: mailing list: contact removed from Group can't re-subscribe
September 02, 2011, 02:34:11 pm

micah:

can u file the issue and attach the patch

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Micah Lee

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 4
  • CiviCRM version: 4.1.0
  • CMS version: Drupal 7
  • MySQL version: 5.1.49
  • PHP version: 5.3.3
Re: mailing list: contact removed from Group can't re-subscribe
September 02, 2011, 03:19:20 pm
No problem, I have submitted it here: http://issues.civicrm.org/jira/browse/CRM-8795

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • mailing list: contact removed from Group can't re-subscribe

This forum was archived on 2017-11-26.