Updated: Comment #N
Problem/Motivation
*.config_translation.yml
files provide a base_route_name
property that the Config Translation module uses to attach child routes to and to generate links with. The problem with link generation is that route parameter values cannot be provided. Because of this the name cannot be of a route that has parameters, as Config Translation does not have any replacement values for the route parameters.
Proposed resolution
Add a base_route_parameters
property and pass the values on to the URL generator.
Remaining tasks
User interface changes
None.
API changes
None. The policy enforces non-BC-breaking API additions only.
See #2154741: [regression][policy, no patch] Route parameters must be able to be provided along with route names for the policy issue about this.
Comment | File | Size | Author |
---|---|---|---|
#24 | support-route-parameters-config-translation-24.patch | 3.34 KB | hmdnawaz |
#6 | drupal_2154743_6.patch | 3.54 KB | Xano |
Comments
Comment #1
XanoLots of unicorns for the lovely people who wrote the existing PHPUnit tests. Making this patch was extremely easy because of those.
Comment #3
XanoComment #6
XanoComment #7
Gábor HojtsyThe other mappers also support passing on route parameters. The names mapper is supposed to be used for single use paths (you can only provide a static set of names), so I'm wondering what is the use case for this?
Comment #8
Gábor HojtsyComment #9
Gábor HojtsyComment #10
XanoThe problem here is that the names mapper makes assumptions about the setup of the route the config is on, while it absolutely should not do that at all.
As discussed on IRC,
\Drupal\config_translation\Access\ConfigNameCheck
and\Drupal\config_translation\Access\ConfigTranslationOverviewAccess
will need to be updated as well.Comment #11
Xano6: drupal_2154743_6.patch queued for re-testing.
Comment #12
tstoecklerStill needs work for #10.
Comment #13
XanoI'd love to have some extra input on this, as I'm a bit lost in how config translation does access control
Comment #14
juanramonperez CreditAttribution: juanramonperez commentedAny status of this?
Comment #21
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedArriving here after a long dark road... trying to get the update path for #2780293: Add GUI to configure the site's logo alt attribute right. In there we're trying to account for theme settings with translate configuration overrides to update, however I'm finding out that core theme settings are actually not translatable as far as I can see.
Getting this issue fixed would make that possible since that's what theme settings pages are, a path with a parameter.
Comment #24
hmdnawaz CreditAttribution: hmdnawaz commentedRerolled patch # 10 for 9.1.x
Comment #25
mossy2100 CreditAttribution: mossy2100 commentedI've just been working on this and after some excruciating digging through deep Drupal code, found my way to this issue.
Just wanted to report the patch by hmdnawaz (#24) works but the one by Xeno (#6) doesn't, despite the green "PASSED" text. I thought that was a bit misleading. Drupal version 9.2.10.