Closed (fixed)
Project:
Multiple Registration
Version:
8.x-2.89
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2020 at 17:02 UTC
Updated:
25 Feb 2023 at 15:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ojchris commentedho w are declaring the variable in your template?
Comment #3
roderik de langen commented{{ login_form }}Comment #4
ojchris commentedTwo things: you are calling the form but not rendering it and rather than confirming anonymity with isAnonymous() we should rather check to see that there is no authenticated user - with is()
Final code:
Comment #5
roderik de langen commentedThanx for the check. But the rendering actually is not the issue, the form is rendering perfect. Only the submit is not working. It just reloads the page and triggers not submit.
O and btw the isAnonymous checks if the user is uid 0
https://api.drupal.org/api/drupal/core%21modules%21user%21src%21Entity%2...
Comment #6
ojchris commentedOh guess mixed up the question
Yes it confirms uid but
isAnonymousdid not work for me as the form doesn't even get rendered. Try with my suggested code verbatim, logs in fine at my end.Update
======
Do you have the registration forms from multiple_registration module and the login form on the same page?
Comment #7
roderik de langen commentedyes both forms are on 1 page
Comment #8
gumrol commentedSame issue here. I found a fix, although it's a bit clumsy and probably requires more testing.
The
multiple_registration_form_alterimplementation is a bit heavy-handed I feel - it should be more precise in the forms it's targeting. Having said that, my own 'fix' is just as heavy-handed. I haven't looked into the ramifications of the change I made, although my login block on my multi-registration pages now work.Where the route is checked and the form altered based on that, I added another check.
Original ~line 205:
I just added a check for the form_id too:
There may be forms other than the registration form that need to be altered by
multiple_registration_form_alterespecially because there is a more specific alter later on in the code too:multiple_registration_form_user_register_form_alter.Or it could be that the whole function could be merged into
multiple_registration_form_user_register_form_alter.. either way, it works for me now.Comment #9
gumrol commentedHopefully someone will get some use out of this patch. It applied cleanly for me on version 2.99.0 and fixes the issue
Comment #10
maddentim commentedSo the patch from @gumrol #9 does not apply to the latest release 3.1.1 as the line that #9 is changing is changed differently coming from
the issue https://www.drupal.org/project/multiple_registration/issues/3258961
I am hoping that this issue is now a duplicate and the other solution is good to go.
Comment #11
maddentim commentedI updated to the patch from #9 to apply to the current 3.1.1 release. This resolves the issue for me.
Comment #12
wombatbuddy commentedComment #13
ysamoylenko commentedThank you @maddentim and @gumrol
for your effort and module support.
The #11 patch will be committed soon.
Comment #15
ysamoylenko commented