Aristotle builds password form on every page which may lead to cache kill

Created on 9 February 2024, 10 months ago

Problem/Motivation

See aristotle_preprocess_page():

  if (!$account->id()) {
    if ($route === 'user.pass') {
      $variables['password_form'] = $variables['page']['content'];
    }
    else {
      $form = Drupal::formBuilder()->getForm(UserPasswordForm::class);
      $variables['password_form'] = $form;
    }
  }

This builds the form on every page for anonymous users. If Honeypot is enabled, page cache kill switch is activated on every page.

Proposed resolution

Get rid of this or create that form conditionally only when needed.

πŸ› Bug report
Status

Active

Version

3.1

Component

Code

Created by

πŸ‡΅πŸ‡±Poland Graber

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024