I have the Problem, that the Token [simplenews-receiver-realname] is being replaced by "Subscriber" instead of the Realname. The Token is used in the text for the subscription confirmation email. I am using Drupal 6.19 and the Simplenews 6.x-2.x-dev version.
Any idea?

Comments

sgabe’s picture

This is because the first time when a user subscribes to a newsletter, the name gets saved in the database after Simplenews has already sent the confirmation message. And this is because the module alters the Simplenews module's database schema... Let me think about this, I think a schema change is needed for this.

brenes’s picture

Ok, thank you for your reply. Would this be a possible extension to your module?

sgabe’s picture

Title: Token Replacement not working » Token replacement is not working for confirmation messages

Yes, it is possible but it requires to change the database schema. Which means this effects the behavior of the whole module so it will take some time till I rework it. Furthermore this needs to be done to the 1.x branch too.

sgabe’s picture

Status: Active » Needs review
StatusFileSize
new16.26 KB

I basically reworked the module from scratch. I am attaching a patch that makes the following changes:

  • Use own database schema.
  • Execute submit callbacks for subscription forms before Simplenews.
  • Upgrade path from previous development snapshots.
  • Support for multi subscription block.
  • Additional modifications and fixes.

I tested it and seemed fine, but could use some more testing. Back up your database before doing anything and don't forget to run update.php!

If this works I would like to port it to the 1.x branch.

brenes’s picture

Status: Needs review » Active

Superb,
it works like a charm. With your patch it is now possible to personalize the (un)confirm subscription emails. I encountered no failures. Thank you

sgabe’s picture

Status: Active » Needs review

Thank you for your feedback.

There will be some minor changes in the commit, but I didn't encounter any major problem with the patch either. I am working on the 1.x branch too, which is slightly different hence needs more work. However I would like to commit these this week, so stay tuned.

sgabe’s picture

Category: bug » feature
StatusFileSize
new17.1 KB
new16.6 KB

Committed for both branches. I am changing category, I think this is more like a feature than a bug after all.

sgabe’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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