Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
user system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
11 Oct 2015 at 13:09 UTC
Updated:
9 Mar 2022 at 12:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedivanjaros created an issue. See original summary.
Comment #2
dave reidWith an update hook to fix existing configs.
Comment #3
cilefen commentedThat is a +1 RTBC from me on manually testing #2.
Comment #4
berdirYeah, this went wrong when we changed [user:name] to [user:account-name]
Surprising that we do not have any failing tests, we need to add one that triggers that mail and looks for the corect mail subject.
Comment #5
cilefen commentedI am working on that test.
Comment #6
cilefen commentedComment #8
berdirNitpick: We usually use single quote unless we have to. Using it for the test string is fine or we could also use string concatenation.
Otherwise, tests looks fine.
Tagging novice for updating that, you can of course also do that yourself if you have time. Then it should be RTBC.
Comment #9
sharique commentedHere is updated patch.
Comment #10
berdirYes, now the test will fail because you also replaced them for the second argument. So $site_name is no longer replaced. You either need to keep " there or do something like ' . $site_name . '
Comment #11
sharique commentedHere is updated patch.
Comment #13
berdirNot quite, sorry. Coding style rules say that there must be a space on both sides of the . for string concatenation, just like I wrote it above.
Comment #14
sharique commentedoh, using windows so not able to run coder :(
Comment #15
sharique commentedComment #18
cilefen commentedComment #20
cilefen commentedI think this is good to go based on #8 and #14 fixing it.
Comment #24
berdirTestbot is having a bad day.
What we're missing is test coverage for the update function, I fear we'll need that too. Maybe there's an existing one to extend, pretty crazy to have a whole new update function just for that.
Comment #26
swentel commentedMarked #2654676: Incorrect token name blocking changes of account settings as a duplicate of this - been bitten by this a few times now (although it's easy to fix yourself of course).
wouldn't it be better to user format_string() here ?
And yeah, we probably need an update path test, although the update function is pretty straightforward if you tell me.
Comment #27
swentel commentedHere's an upgrade path test as well. The annoying part here is that bare standard contains the right token already. Went for a different file to delete and then re-insert the configuration with the bad token.
Interdiff also serves as test only patch.
Comment #29
swentel commentedHa right, that interdiff patch can't apply, sorry about that :)
Comment #30
berdirLooks good to me, nice work!
Comment #31
catchEverything else looks fine, except shouldn't this be user_update_8100? Or alternative the defgroup should mention 8.0.x rather than 8.1.x.
Comment #32
swentel commentedI changed it to 8100 since I think you'll only commit this to 8.1.x since it has an upgrade path which isn't really critical right ?
Comment #34
catchYeah the upgrade path looks extremely non-worrying, but also bug isn't severe enough to warrant an update in 8.0.x.
Committed/pushed to 8.1.x, thanks!
Comment #36
prdsp commentedwhich directory should I put this patch file in?
Comment #37
cilefen commentedCore patches are made with respect to the Drupal root directory, so put it there. See https://www.drupal.org/patch/apply
Comment #38
cilefen commented@prdsp But all that is needed is to edit the token in the user email form as you can see in the patch file.
Comment #39
prdsp commentedI got it to run using cygwin on windows with the patch file from #32 placed in drupal root directory
But I had to use -p1 instead of -p0 when patching
Here is the command i used
patch -p1 < invalid_token_used_in-2587275-32.patch
As a note to anyone else patching with cygwin be sure to right click and run as administrator
also update.php needs to be run after patching for the fix to show
thanks for the patch and the help!
Comment #40
fomenkoandrey commentedthe same error in drupal 8.0.3
I can not save changes on the page /admin/config/people/accounts with invalid [site:account-name] token.
but the page is not used anywhere [site:account-name] token.
Comment #41
fomenkoandrey commentedComment #42
cilefen commentedThus is already fixed and will appear in a future release. I don't think it made it in 8.0.3. Fix the token manually as described in the issue summary.
Comment #43
cilefen commentedIt will be fixed in 8.1.0.