I just upgraded from 6.x-2.2 to 6.x-2.4 last night and found that, when the sign-up block is active for a mailing list, all page titles now show up as 'Newsletter Subscriptions'. This only happens for authenticated users, not anonymous users.

Disabling the block solves the problem.

Anyone else run into this?

Comments

theruslan’s picture

Upgraded from 6.x-2.3 to 6.x-2.4, same problem.

Poieo’s picture

I can confirm the same issue with the 2.4 version. However, it only happens for authenticated users.

Edit: Tested with Garland to insure it's theme independent.

Poieo’s picture

This seems to be causing the problem:

      // if page display
      if ($page) {
        // for some reason drupal core hammers the page title callback by the time
        // the H1 is rendered?
        drupal_set_title(t(variable_get('mailchimp_user_settings_title', 'Newsletter Subscriptions')));
      }

on line 175 of mailchimp.module.

jerry’s picture

Same here. Subscribing.

jerry’s picture

Quick fix for now - change line 176 of mailchimp.module from:

      if ($page) {

to:

      if ($page && arg(0) == 'user') {
Poieo’s picture

Priority: Normal » Major

Thanks jerry.

This works for me. Not sure if this causes any other issues. So far so good.

Marking as major as this bug completely removes your ability to use the signup block.

fenstrat’s picture

It appears this bug was introduced in this commit.

I've followed this up with a patch which fixes this bug over at #744030-5: patch for not everything is a "newsletter".

krisrobinson’s picture

Same problem. Quick fix worked.

fenstrat’s picture

@honucreative The quick fix doesn't actually remove the source of the problem. Can you try the patch linked to from #7?

pieterdc’s picture

Status: Active » Needs review

#744030: patch for not everything is a "newsletter" seems to be a duplicate of this issue

@fenstrat: the patch linked from comment #7 fixes the problem but it re-introduces the "bug" that was fixed by the code that causes this problem... hmm, sounds complicated :p
Short: the patch from #7 fixes the problem that all pages got 'Newsletter Subscriptions' as a title but it doesn't set that title on user/%user_id/mailchimp either. And that's where it should appear.

krisrobinson’s picture

@fenstrat: i will try the patch... the quickfix is a band aid solution I found out - all the user pages now have the title newsletter subscriptions... aiee.

krisrobinson’s picture

I tried to apply the patch it didn't seem to work. I went back to 2.3 for now, my site is about to go live.

jerry’s picture

If the little fix in #5 didn't work for you, it's likely because you're displaying the signup block on the user pages. This modification to that fix should take care of that case. Change line 176 of mailchimp.module from:

      if ($page && arg(0) == 'user') {

to:

      if ($page && arg(0) == 'user' && arg(2) == 'mailchimp') {

No doubt there's a better way to handle it, but this should tide you over until it's available.

rickmanelius’s picture

subscribing

atzanov’s picture

Thank you Jerry. For a while I had resolved to keep the Mailchimp module disabled until next version is released, but your solution fixed the problem and saved the day. :)

levelos’s picture

Status: Needs review » Fixed

I'm going with fenstrat's approach in #744030-5: patch for not everything is a "newsletter". I don't think the page variable scheme has any business here. My mistake for letting it through in the first place.

flock’s picture

Patch in #13 worked perfectly for me.
Thanks.

fenstrat’s picture

#13 is not a patch. The correct fix was comited here. That fix is available in the current -dev version and will be included in the next 2.5 release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

j0rd’s picture

Same problem. Would be nice to get a bug-fix release.