- Issue created by @marcus_johansson
- 🇬🇧United Kingdom littlepixiez
It is failing here:
$this->assertSession()->pageTextContains('[Chocolate Cake](' . $this->nodes[0]->toUrl()->toString() . ')');
However, in Drupal 11.2, this is how the markup appears:
And in Drupal 11.3, this is how the markup appears:
I can't quite figure out where Drupal core has made a change that is effecting this. The actual value is missing completely, so the rendered item in 11.2 is:
<article> <h2> <a href="/node/1" rel="bookmark"> <span>Chocolate Cake</span> </a> </h2> <footer> <article> <div class="js-form-item form-item js-form-type-item form-item- js-form-item- form-no-label"> <h4 class="label">Member for</h4> 0 seconds </div> </article> <div> Submitted by <span><span>ct7lb84o</span></span> on <span><time datetime="2025-09-02T07:29:43+10:00" title="Tuesday, 2 September 2025 - 07:29">Tue, 2 Sep 2025 - 07:29</time> </span> </div> </footer> <div> <div><p>d53u1fapp20u9xclhptuqr7cm83p5cp5</p> </div> </div> </article>
And the rendered item in 11.3 is:
<article> <footer> <article> <div class="js-form-item form-item form-type-item js-form-type-item form-item- js-form-item- form-no-label"> <h4 class="label">Member for</h4> 0 seconds </div> </article> <div> Submitted by <span><span>uxwhrmlz</span></span> on <span><time datetime="2025-09-02T07:31:11+10:00" title="Tuesday, 2 September 2025 - 07:31">Tue, 2 Sep 2025 - 07:31</time> </span> </div> </footer> <div> <div><p>vhzxyxa8xnq3kfrlsbpgsblz1sme4xza</p> </div> </div> </article>
So it is stripping out the H2 completely. I'll have more of a dig when I get time - perhaps somebody can glance at this and have an "aha" moment!
Depending on how much we "need" this to be correct, we could just add in a conditional or just check for the title? Dependant on this module's need for the check. I can't see anything that's "breaking" this, but I'd need some more time to dig in.
- 🇬🇧United Kingdom scott_euser
Thanks, that debugging was very helpful!
Not solved yet, but I can see as a result of `git bisect` that 📌 Deprecate $variables['page'] for node.html.twig Active is the issue. Namely the change there to the node.html.twig now checks if view mode is full, and if so, does not output the URL.
So we are expecting to render the 'full' view mode and therefore the URL should not be expected after that commit.
We can update the tests to check that the title of the found results are as expected rather than title and link. E.g. either
[Chocolate Cake](
(to keep it working in 11.2) or# Chocolate Cake
(i.e., without the URL for 11.3) - Merge request !867#3544206 Changed view mode for entity in view to "default" to resolve issue... → (Merged) created by littlepixiez
- 🇬🇧United Kingdom littlepixiez
So sorry @gxleano, I missed the assignment being to yourself! I was just testing this all locally and @scott_euser you are a genius - I have never heard of git bisect before.
It looks like we can just update the view mode to "default", and it will then show the label reliably in all versions, /or/ we can update what we are looking for in the test. I have tested it with changing the view mode here:
https://git.drupalcode.org/project/ai/-/merge_requests/867However, @gxleano you may want to fix this as it's assigned to yourself. :)
- Merge request !881Resolve #3544206: AI Search tests is failing on next minor → (Open) created by scott_euser
- Merge request !882Resolve #3544206 "Ai search next minor attempt3" → (Merged) created by scott_euser
- Merge request !887Resolve #3544206 "Make check for cake protective" → (Merged) created by scott_euser