Needs review
Project:
Pathauto
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
19 Oct 2026 at 15:20 UTC
Updated:
6 Nov 2026 at 14:21 UTC
Jump to comment: Most recent, Most recent file
The generator always generates a link for the verbose messenger but that might not on, so this is not necessary.
Change/refactor VerboseMessenger (deprecate the interface, stop using?) to add verboseEnabled() method or so and then inside to the message, or using a callback or something.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | before-1-verbose-message.png | 97.51 KB | realsp |
| #4 | after-1-verbose-message.png | 96.54 KB | realsp |
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
Comment #4
realsp commentedI opened an MR https://git.drupalcode.org/project/pathauto/-/merge_requests/194
Problem
AliasStorageHelper::save()builds and renders a link to the new alias for the "Created new URL alias" message, and only then passes it toVerboseMessenger, which drops it unless verbose messages are on. Verbose is off by default, so on most sites every alias save resolves a URL through the path validator and router and renders a link nobody sees. The link was added in #3419907, and #3608478 moved it after the save. This is the remaining part.Fix
VerboseMessengerInterface extends MessengerInterfacewithisVerbose(?string $op = NULL): bool.VerboseMessengerimplements it, and the existing check (setting, notify of path changes permission, op) moves intoisVerbose(), whichaddMessage()also uses.AliasStorageHelper::save()builds the link and adds the message only whenisVerbose()is TRUE. If the messenger is some otherMessengerInterfaceimplementation, it behaves as before.MessengerInterfaceis unchanged, so this doesn't break anyone implementing it.Results
With verbose off, 200 saves took a median of 1093 ms before and 415 ms after (5 runs each, local DDEV; rough numbers).
With verbose on, the message and its alias link work as before:
Before:

After:
AI disclosure: Claude Code was used for the investigation and to draft this comment; reviewed and tested by a human.