Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
From the parent issue
PathController::adminOverview()
We want to link to a PATH (its an path alias), and run path processing to show the alias (sadly this is not covered by unroutedUrlAssembler)
Proposed resolution
We could though fetch the alias manually.
Add an option to UnroutedUrlAssembler
to perform outbound path processing. (Off by default.)
Remaining tasks
None.
User interface changes
None.
API changes
API addition: path_processing
option for UnroutedUrlAssembler::assemble()
.
Beta phase evaluation
Issue priority | Critical because providing a complete, solid API to generate URLs is essential for a CMS. |
---|---|
Prioritized changes | The main goal of this issue is removing previously deprecated code. |
Disruption | No disruption. |
Comment | File | Size | Author |
---|---|---|---|
#24 | 2368323-24.patch | 8.06 KB | swentel |
#22 | interdiff.txt | 1.69 KB | swentel |
#22 | 2368323-22.patch | 8.07 KB | swentel |
#19 | 2368323-19.patch | 8.04 KB | dawehner |
#16 | interdiff.txt | 2.57 KB | dawehner |
Comments
Comment #1
dawehnerI think the way to go here is to add a variant to UnroutedUrlAssembler which includes path processing,
but this should be off by default. Does someone has an oppinion about that?
Comment #2
YesCT CreditAttribution: YesCT commentedadding blocker tag, since this blocks #2343669: Remove _l() and _url(), so that the d8 blockers is accurate. Remove the blocker tag when this issue is fixed, and unpostpone 2343669 if this was the last blocker of that.
Comment #3
YesCT CreditAttribution: YesCT commentedComment #4
dawehnerOne simple solution would be to add opt in path processing functionality to the unrouted URL assembler.
Comment #5
dawehnerSo this is one way to fix it, this works at least, but I don't really like it, to be honest.
Comment #7
dawehnerOkay, let's feed the url assembler a litte bit more.
Comment #9
martin107 CreditAttribution: martin107 commented\Drupal\Tests\Core\Utility\UnroutedUrlAssemblerTest. now passes.
Comment #10
larowlanAny reason why we don't have an interface for this? I realise it implements two existing interfaces so it would be an amalgam of those.
Unneeded change
Comment #11
andypostAny reason to make it in constructor?
Comment #12
larowlanIssue summary/title says replace _l in PathController::adminOverview() but I don't see that change in the patch?
Comment #13
dawehnerJust be clear, I never promised that this patch would be ready ... all I wanted to do for now, is to outline what my idea is.
... its a special usecase, so you should always manually opt in, if possible.
Comment #15
Wim LeersSensible solution IMO. And the patch is looking great.
I think either of these should explicitly mention
PathController::adminOverview()
as an example of a valid use case.I had to read these 3 times :P Could you shorten them a bit? :)
string|FALSE
Comment #16
dawehnerThank you for your review!
That is a total valid point.
This should be green now as well.
Comment #17
tim.plunkettIs this from another issue?
Comment #18
Wim Leers#17: I think so. NW for that. The interdiff looks good, but the patch contains unrelated stuff. I think Daniel might've forgotten to do a hard reset :)
Comment #19
dawehnerYeah I forgot to merge the recent patch in.
Comment #20
Wim LeersI think this is ready. A simple addition, test coverage, supporting a rare use case (hence no CR needed IMHO) that helps us to resolve the url()/l() fallout (one of the last 5 after #2364161: Replace nearly all existing _l calls).
IS updated, beta evaluation added.
Nitpicks that can be resolved on commit:
s/output/outbound/
s/path processing/(outbound) path processing/
outbound path processor
Comment #21
alexpottNeeds a reroll...
And
This comment needs reflowing...
Comment #22
swentel CreditAttribution: swentel commentedRerolled and addressed #20
Comment #23
dawehnerYeaaaaah!
Comment #24
swentel CreditAttribution: swentel commentedRerolled - #18 is probably fine too ..
Comment #25
alexpottThis issue addresses a critical bug and is allowed per https://www.drupal.org/core/beta-changes. Committed a942dd5 and pushed to 8.0.x. Thanks!