Needs work
Project:
Drupal core
Version:
main
Component:
user.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Sep 2016 at 19:17 UTC
Updated:
18 Dec 2020 at 21:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sebastien m. commentedHi,
The issue seems to moved a few. Now I can create the page, but I'm unable to include in the page the user form login.
I'm can include the search form, and other block, but I can include login form.
Does someone perform to do it ?
Thanks
Comment #3
damienmckennaLets put together a test to make sure this block can be added to a display.
Comment #4
andrii_svirin commentedI have by this uri /user/atatat throwing exception that is not presented in themed 404 page error. May be this is can help.
Comment #5
nitebreedI changed the title & description, because the original issue doesn't exist anymore. The other issue mentioned in #2 is the real problem now.
I attached a patch that fixes this, although I'm not sure this is the right fix because I don't know why the code was there in the first place; in the blockAccess() function there's a check if the current route isn't 'user.login'. Well in our case it IS. Can someone verify why this code was originally set up?
Comment #6
nitebreedComment #11
tstoecklerI didn't do any digging but I'm pretty sure that this is just legacy code, because generally it does not make sense to display a login block if the main page content is already the same login form. However, that should be accomplished using the path visibility configuration of the respective block, not hardcoded in the block plugin. Not sure why the logout route is there as well, as that will always just redirect anyway, so it will never display any blocks.
So, I think we should do the following:
::blockAccess()implementation entirely fromUserLoginBlock/user/loginand/user/logoutpaths to all existing login blocks for backwards-compatibility. This will need to take into account the possibility of path visibility already being set for any block./user/loginpath (but not the/user/logoutpath) is excluded by defaultIf people agree with that plan, we can update the issue summary accordingly.
Comment #16
piggito commentedI tracked it all the way back to d7 issue https://www.drupal.org/project/drupal/issues/345866 with comment
// For usability's sake, avoid showing two login forms on one page.so I believe this confirm we are save to remove this constraint to give user full control over block placement in page manager.