Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Dear community and developers,
I am using the "login one time"-module in my webproject with success. However, each time, when a user creates a new node and the corresponding rule fires (create a new user, send a "login first time"email to the created user), Drupal puts out an error message:
Notice: Undefined index: path in login_one_time_tokens() (Line 890 in mypath/sites/all/modules/login_one_time/login_one_time_module.
Probably relevant for the problem analysis: I am using an inidividual "login first time"-registration page.
What could be the problem?
Thank you in advance!
Drupalissiomo
Comment | File | Size | Author |
---|---|---|---|
#7 | notice_undefined-1764134-7.patch | 609 bytes | joelpittet |
#3 | login_one_time-path_undefined_index-1764134-3.patch | 611 bytes | stewart.adam |
Comments
Comment #1
davenyss CreditAttribution: davenyss commentedhave similar issue when using "forgot my password", looked at code statement 890
$replacements[$original] = login_one_time_get_link($account, $data['path']);
the path parameter is optional to "login_one_time_get_link" and is not being set in array $data, yet the code is not allowing for this possibility, resolved it on my website by applying following temporary fix to login_one_time.module
$path = (isset($data['path'])) ? $data['path'] : null;
$replacements[$original] = login_one_time_get_link($account, $path);
Comment #2
Artnetik CreditAttribution: Artnetik commentedI have the same problem in combination with Commerce, after complete the order.
Comment #3
stewart.adam CreditAttribution: stewart.adam commentedPatch attached based on #1.
Comment #4
dmitrii CreditAttribution: dmitrii commentedworks for me
Comment #5
paultrotter50 CreditAttribution: paultrotter50 commentedPatch from #3 works for me- thanks stewart.adam
Comment #6
jsibley CreditAttribution: jsibley commentedMight this be committed anytime soon? Thanks.
Comment #7
joelpittetLeaving this as RTBC, rerolled due to changes.
Comment #8
Maedi CreditAttribution: Maedi commentedThanks, committed to dev.