Sorry for not implementing a proper patch

But simplenews_tokens() function is using url () with the language option as a string "es", "fr", etc... instead of the whole language object, as it is supposed to be.

$language = isset($account->language->language) ? $account->language->language : language_default()->language;

Should be used user_preferred_language instead. Probably using it inside simplenews_subscribe_user() function, when account is loaded.

Comments

corbacho’s picture

Issue summary: View changes

fixing solution

vogelsang’s picture

I got this problem. Anyway I can fix it? I like to get a newsletter up and running on my new D7 site.

I'm not sure wether or not you suggest to do something or the issue is just not prioritized right now. At least I can't figure out what to with the line you have written.

Thanks in advance :-)

Edit: I found a work around. I turned of every language but one from my Drupal installation, so apparently the language check isn't done anymore and I don't get the error.

bjaxelsen’s picture

StatusFileSize
new650 bytes

I've made this patch, please check if it works :-)

simon georges’s picture

Status: Active » Needs review
.jon’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #2 fixes the issue.

Thanks bjaxelsen!

simon georges’s picture

Status: Reviewed & tested by the community » Needs work

What about using user_preferred_language($account) instead, as suggested in the initial post ?

sgabe’s picture

Status: Needs work » Needs review
StatusFileSize
new665 bytes

Patch attached using user_preferred_language($account); as Simon requested.

simon georges’s picture

Thanks, sgabe!

miro_dietiker’s picture

#6: simplenews_1230796_02.patch queued for re-testing.

giorgosk’s picture

StatusFileSize
new624 bytes

line numbers in module have changed
but otherwise change gets rid of the notices

Status: Needs review » Needs work

The last submitted patch, simplenews_1230796_09.patch, failed testing.

berdir’s picture

Status: Needs work » Fixed

Thanks, commited.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

add suggestion