Score:1

Certain users see 404 when logging in

in flag

We are seeing an odd error with certain users who are trying to log in to a Drupal 9 site. They are using the login form at /user/login, at which point they submit and are redirected to a URL like:

/user/form_action_p_pvdeGsVG5zNF_XLGPTvY....

Which results in a 404.

This only happens to 2 out of 20 users. If I use Drush to generate a login link, it works fine.

What could be causing this? There isn't much installed besides Pathauto, Token, Redirect, and Acquia Site Studio.

Score:1
cn flag

form_action_p_pvdeGsVG5zNF_XLGPTvYSKCf43t8qZYSwcfZl2uzM is used as placeholder for the action URL (for submitting the form).

If you still see this placeholder in the browser HTML source then the placeholder somehow got separated from the attached lazy builder. To debug this you could start with a form alter hook, where you see the placeholder string and the attached lazybuilder callback FormBuilder::renderPlaceholderFormAction. Go step by step through the render pipeline and check for custom code or templates which doesn't render the entire form as it should to carry on attached metadata.

Kevin avatar
in flag
Acquia is saying this is because of BigPipe combined with Site Studio. We aren't using Site Studio in any way on the user login form and no other modifications to that form have been made. Is BigPipe truly the culprit here? It would be the first time I have ever encountered this with BigPipe. How could it be resolved if it is in fact BigPipe (besides turning it off, of course)?
4uk4 avatar
cn flag
Form tokens are not handled by BigPipe, only the HTML tag styled placeholders used for render arrays.
4uk4 avatar
cn flag
Tested /user/login. If you are logged out BigPipe is disabled (works only with sessions). If you are logged in and display the form by other means, BigPipe is active, but doesn't deliver the form token, because non HTML tag styled tokens are excluded from BigPipe and are replaced on the server. See https://api.drupal.org/api/drupal/core%21modules%21big_pipe%21src%21Render%21Placeholder%21BigPipeStrategy.php/function/BigPipeStrategy%3A%3AdoProcessPlaceholders
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.