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.
Config Entity sub issue from #2135777: Follow-up [meta] local task conversion, move out of hook_menu() and to local_tasks.yml.
Comment | File | Size | Author |
---|---|---|---|
#23 | interdiff.txt | 842 bytes | amateescu |
#23 | local-task-config-entity-23.patch | 7.16 KB | amateescu |
Comments
Comment #1
YesCT CreditAttribution: YesCT commentedComment #2
Gábor HojtsyHere is a patch which is complete to all config entities (at least those handled by config translation) *except* field instances, which need a local task derivative provider. Needs a little bit more time to do :)
Comment #3
Gábor HojtsyOk I looked at the fields stuff, and that is a whole can of worms. I think YesCT also already has a bug about that, so let's do it there. Cannot find the link right now... So here I think this is now the full scope :) Fixed the newlines, and I think this should be ready to review / commit :D
Comment #4
YesCT CreditAttribution: YesCT commentedI was looking at #2 ...
do we lose the idea of MENU_CONTEXT_PAGE
?
Comment #5
YesCT CreditAttribution: YesCT commented#2109937: Manage fields local tasks not displayed at admin/config/people/accounts
Comment #6
Gábor HojtsyThe menu context page constant does not really do anything on that item. See https://api.drupal.org/api/drupal/includes%21menu.inc/constant/MENU_CONT... this means the tab shows on the page :) This flag is meaningful in combination with other contextual states (eg MENU_CONTEXT_INLINE), but those are now removed from the menu system. So you get the same thing before/after.
Comment #7
Gábor HojtsyRetitled for full scope.
Comment #8
Gábor HojtsySo #2111823: Convert field_ui / Entity local tasks to YAML definitions already covers the dynamic local tasks in field_ui, so we should be good here. This patch is as complete as it can get :) Reviews please!
Comment #9
YesCT CreditAttribution: YesCT commentednoticed this. I'll fix it and finish reading through.
Comment #10
tstoecklerIs there a reason these are not removed from the respective hook_menu() implementations?
Comment #11
Gábor Hojtsy@tstoeckler: there are some tasks that were not there before, eg. the views one and the entity module ones AFAIS. (Which were I think missing from earlier rounds of patches to ensure edit tabs on config entities are present by default). The image module one I did forget to remove from the module, that needs to be done. Not going to post an update since @YesCT is on changing stuff.
Comment #12
YesCT CreditAttribution: YesCT commentedthis is taking out /edit... but
has a customize without /edit and a different route for /edit
I think this was just missing. It has no cooresponding hunk removing stuff from system_menu(). ok.
Comment #13
YesCT CreditAttribution: YesCT commented#12 1. is ok. I get it now.
Comment #14
YesCT CreditAttribution: YesCT commented/list didn't work before this patch anyway ok.
similar here, /edit didn't work before anyway and goes to the default manage/%user_role. ok.
SO.
only the weight typo and the image style removal of the local task from it's hook_menu.
I tried a bunch of these manually too and they work fine.
This looks rtbc to me.
Comment #15
YesCT CreditAttribution: YesCT commentedneeds review for testbot and unassigning.
Comment #16
jsbalseraAfter applying the patch the "Edit" tab disappears from, for example, "admin/structure/types/manage/article/fields", but I suppose that this is covered by #8
Same happens in contact, like in "admin/structure/contact/manage/personal/fields", but again I think this is covered by #8
All the other changes (shortcut, roles, etc) behave exactly the same, so for me would be RTBC
Comment #17
tstoecklerRe #11: As far as I'm aware, the entity ones are in fact present in entity_menu(), so I guess those would need to be removed as well.
Comment #18
Gábor HojtsyI think its dangerous to commit this without #2111823: Convert field_ui / Entity local tasks to YAML definitions since it will hide all field UI entry points from the UI. So you will not be able to add fields to node types, block types, etc. That is pretty dangerous. This should be committed "at the same time" as #2111823: Convert field_ui / Entity local tasks to YAML definitions, basically right after each other.
Comment #19
amateescu CreditAttribution: amateescu commentedIt's not dangerous if you leave out the tasks that are already handled by that patch :)
Removed them from the patch so I think we're good to go here.
Comment #20
Gábor HojtsyI agree, looks good :) The other ones need to be with the dynamic field ones so the tabs don't break. We already broke account fieldability before (which will still not be fixed in alpha5 unless we don't get #2111823: Convert field_ui / Entity local tasks to YAML definitions in as well).
Comment #21
amateescu CreditAttribution: amateescu commented@alexpott pointed out that we have a leftover entry in views_ui_menu(), let's remove it as well.
Comment #22
alexpottAccording to @amateescu in irc #21 was preventing the views tabs from appearing so kicking back to needs work to get a test added.
Comment #23
amateescu CreditAttribution: amateescu commentedHere we go.
Comment #24
amateescu CreditAttribution: amateescu commentedIt turns out the tabs not appearing was a local problem (had to clear the caches), but the test is still good to have :)
Comment #25
Gábor HojtsyYay, looks good again :)
Comment #26
webchickCommitted and pushed to 8.x. Thanks!
Comment #27
tstoecklerDoes someone want a follow-up issue for #17 or can I post a quick patch here?
Comment #28
tstoecklerSee you in #2139195: Remove left-over entries in entity_menu()