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
We have to replace all left usages of _l()
, just 46 of them ...
Proposed resolution
Do all of them, except 5 calls in:
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). We could though fetch the alias manually. Child issue is #2368323: Replace _l() in PathController::adminOverview().UrlTest::testLinkXss()
This is testing_l
itselfFieldPluginBase::renderText()
(2 calls) We do have an issue for itself #2280961: (Views)FieldPluginBase::advancedRender() calls SafeMarkup::set() on a string that it doesn't know to be safe\Drupal\views\Plugin\views\field\Url::render()
#2368653: Replace _l in all places (3) besides one.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#14 | replace_nearly_all-2364161-14.patch | 32.24 KB | mpdonadio |
Comments
Comment #1
dawehnerComment #2
dawehner.
Comment #4
dawehnerLet's see how much can be fixed with that.
Comment #6
dawehnerThere we go.
Comment #8
dawehnerReroll.
Comment #9
Wim LeersPatch didn't apply anymore. Straight reroll.
Updated the IS with the ones that aren't replaced by this patch. I'm assuming those are very tricky for very intricate/complex reasons.
In any case, this is a big step forward. I'd like to see confirmation from dawehner that those 5 unconverted calls are indeed the ones he intended not to convert. Once he confirms that, this is RTBC.
Comment #10
dawehnerAdded comments to all the calls.
Comment #11
Wim LeersThanks for the clarifications; this is now RTBC then :)
Comment #13
mpdonadioPatch doesn't apply anymore. Few manual merges to check.
Comment #14
mpdonadioApplied 2364161-9.patch to eb56c4d352457f, and did rebase. Two manual merges were needed. Needed to merge the use section in LinkFieldTest, and also had to account for the Unicode change in PathController on line 92 (and made sure not to touch line 89 per the proposed resolution above). I don't know what test covers PathController, so couldn't test this change locally.
Comment #15
Wim LeersManually compared those conflicting hunks; they look good: same logical changes as before. Thanks!
Hence back to RTBC!
Comment #16
alexpottCan we get issues filed for 1 and 4 of the remaining calls to
_l()
- and can relevant CR be updated to link to this issue. Thanks.Comment #17
mpdonadioUpdated CR, and made issue for PathController::adminOverview(), but I don't know why \Drupal\views\Plugin\views\field\Url::render() isn't being updated.
Comment #18
dawehnerThank you @mpdonadio
Here is the other one. Back to RTBC
Comment #19
alexpottThis issue addresses a critical bug and is allowed per #2350615: [policy, no patch] What changes can be accepted during the Drupal 8 beta phase?. Committed 46e6a32 and pushed to 8.0.x. Thanks!