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.
Updated: Comment #1
Problem/Motivation
Routes now uses $module.foo as the route names, so to be more consistent use the same kind of pattern for local actions.
Proposed resolution
use the route name + ".action" as each ID. Keeping the ID distinct from the route name will help avoid mistaken assumptions (especially in tests).
Before
custom_block_type_add:
route_name: custom_block.type_add
title: 'Add custom block type'
appears_on:
- custom_block.type_list
After 1 (the one in the last patch)
custom_block.type_add.action:
route_name: custom_block.type_add
title: 'Add custom block type'
appears_on:
- custom_block.type_list
After 2
custom_block.type_add:
route_name: custom_block.type_add
title: 'Add custom block type'
appears_on:
- custom_block.type_list
After 3
-
plugin_id: custom_block.type_add
route_name: custom_block.type_add
title: 'Add custom block type'
appears_on:
- custom_block.type_list
Remaining tasks
User interface changes
API changes
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#29 | 2091145-local-action-D8-29.patch | 7.74 KB | sokru |
#27 | 2091145-local-action-D8-27.patch | 6.17 KB | sokru |
#15 | increment-2091145-10-13.txt | 4.85 KB | pwolanin |
#15 | local_action-2091145-13.patch | 4.8 KB | pwolanin |
#10 | local_action-2091145-10.patch | 4.38 KB | pwolanin |
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedSeparate issue for local tasks: #2095613: Convert all plugin IDs in local_tasks.yml to 'module_name.foo_bar' naming convention to match routing convention
Comment #2
mr.baileysFirst stab. Only replaced the underscore between module and foo with a period (.), there is still some inconsistency left in the local actions names (some have the suffix "_local_action", others "_action" or no suffix. Should that also be changed as part of this issue?
Comment #3
mr.baileysMissed one reference.
Comment #5
mr.baileysLocal install was not up-to-date with HEAD, patch in #2 was correct after all, re-uploading.
Comment #5.0
mr.baileysUpdated issue summary.
Comment #6
dawehner2: 2091145-2-local-actions-yml.patch queued for re-testing.
Comment #8
dawehnerThis should work
Comment #9
pwolanin CreditAttribution: pwolanin commentedI'd like to keep _action or .action on them - I think having too many thinks named the same as the route by chance is going to be confusing and lead to mistakes & bugs in the future.
Comment #10
pwolanin CreditAttribution: pwolanin commentedAdds ".action" to each ID
Comment #11
dawehner-1
Comment #12
pwolanin CreditAttribution: pwolanin commented@dawehner - I really feel using the same name as the route everywhere is going to lead to subtle bugs and mistakes in contrib.
Why not append something distinct?
Comment #13
dawehnerComment #14
pwolanin CreditAttribution: pwolanin commentedWould it be helpful to also add a comment in the YAML, like:
Comment #15
pwolanin CreditAttribution: pwolanin commentedThis adds the comment to all the IDs, and also fixes the views_ui one to have "views_ui" not "views" as the prefix.
Comment #16
pwolanin CreditAttribution: pwolanin commented15: local_action-2091145-13.patch queued for re-testing.
Comment #25
apadernoComment #26
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedIt looks like needs a re-roll.
Comment #27
sokru CreditAttribution: sokru as a volunteer commentedJust a reroll.
Comment #29
sokru CreditAttribution: sokru as a volunteer commentedFixing tests.
Comment #36
smustgrave CreditAttribution: smustgrave at Mobomo commentedThink if we are changing the schema for so many things they will need an upgrade path for existing sites. Which will require tests also.