Problem/Motivation

Just found this while converting a contrib test where the assertions were getting page elements using CSS IDs, and those IDs were being made in the SUT using \Drupal\Component\Utility\Html.

HttpKernelUiHelperTrait needs to call Html::resetSeenIds() after a request (or we need to fix \Drupal\Component\Utility\Html to it works for this and for persistent servers).

Steps to reproduce

Proposed resolution

For main requests, reset seen IDs and disable AJAX mode at the start of DrupalKernel::handle(), before middleware runs. Preserve subrequests' shared ID namespace.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3594651

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joachim created an issue. See original summary.

joachim’s picture

ptmkenny’s picture

Issue summary: View changes

Added a proposed fix for this and updated the IS to describe the fix.

This issue is one of the several necessary fixes to use Drupal with FrankenPHP worker mode.

AI disclosure: I used AI to help prepare the IS and MR (Astra and Opus 5.5).

ptmkenny’s picture

Status: Active » Needs review
joachim’s picture

Unsubscribing due to use of LLMs.

ptmkenny’s picture

Status: Needs review » Postponed

@mstrelan Sure, I'll postpone this on the ResetInterface.