When I register a new user, I get an email looking like this.
Seems like the variables are not resolved.

Please help :S

%username,

Thank you for registering at %site. You may now log in to %login_uri using the following username and password:

username: %username
password: %password

You may also log in by clicking on this link or copying and pasting it in your browser:

%login_url

This is a one-time login, so it can be used only once.

After logging in, you will be redirected to %edit_uri so you can change your password.

Your new %site membership also enables to you to login to other Drupal powered websites (e.g. http://drupal.org/) without registering. Just use the following Drupal ID and password:

Drupal ID: %username@%uri_brief
password: %password


--  %site team

Thanks!

CommentFileSizeAuthor
#14 user_update_vars.patch931 bytesChrisKennedy
#8 variables.jpg8.82 KBjacauc

Comments

RobRoy’s picture

Did you upgrade from 4.7? Is there nothing in place to convert %vars to !vars in system variables that need this change? Is this documented somewhere?

ChrisKennedy’s picture

There isn't anything to do the conversion automatically, yet. I've seen it mentioned before but I don't remember if it was in the bug queue or the forums. So yeah, upgrading will be a problem for all sites.

RobRoy’s picture

Title: Variables won't resolve when registering a new user » Upgrading from 4.7 to 5 doesn't convert %variables to !variables in email messages for example

Changing title to be more accurate. We'll need to convert any variables in system_update_X() or provide some upgrade docs on this (if there isn't already).

jacauc’s picture

Priority: Normal » Critical

Rather serious i think

Steven’s picture

Status: Active » Fixed

Wrote a quick patch, tested and verified. Committed to HEAD. *woosh*

jacauc’s picture

Where can I get hold of this patch?
My site is already upgraded to 5.x HEAD, so I did not go through the upgrade process again (i did run update.php though)... Thus my variables is still in the old format.

ChrisKennedy’s picture

Running sites off of HEAD should be avoided - if you want support please use a released version of Drupal.

Nevertheless, Steven's patch is shown at http://cvs.drupal.org/viewcvs/drupal/drupal/modules/system/system.instal...

You can also change each % to a ! yourself at admin/user/settings.

Although, now that I look at it again it appears that user_mail_admin_approval and user_mail_admin_subject were accidentally left out of the variable replacement patch.

jacauc’s picture

Status: Fixed » Needs work
StatusFileSize
new8.82 KB

Well, this is not a production site, this is the same development site I'm still using since I reported this issue.
I am marking this issue as CNW again due to what you said about user_mail_admin_approval and user_mail_admin_subject.

I have also seen this issue on the aggregator if I go to admin/aggregator, I see the title of my Feed, but under "Items" it shows "%count items" - See the screenshot

jacauc’s picture

Disregard my previous comment about:
"I have also seen this issue on the aggregator if I go to admin/aggregator, I see the title of my Feed, but under "Items" it shows "%count items" - See the screenshot"

Seems to be another problem I had on the site.

Steven’s picture

This is unrelated. Open another issue.

Jaza’s picture

Status: Needs work » Fixed

Moving back to fixed. Don't want issues unnecessarily sitting in the 'critical' queue.

jacauc’s picture

This is unrelated. Open another issue.

I understand that the aggregator issue is not related with this... Is the user_mail_admin_approval and user_mail_admin_subject issues ChrisKennedy reported something to be concerned about here?

Anonymous’s picture

Status: Fixed » Closed (fixed)
ChrisKennedy’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new931 bytes

Here is a patch to convert the remaining two variables: user_mail_admin_subject and user_mail_admin_body. This needs to be fixed as upgraded sites will be unlikely to notice that these two variables are not automatically converted.

Steven’s picture

Status: Needs review » Fixed

Committed to HEAD, thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)