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.
A service's edit page should surely be in the same tab set as its other admin pages:
- admin/structure/services/list/NAME/edit -- edit page
- admin/structure/services/list/NAME/resources -- resources settings page
Though this may be down to Ctools...
Comment | File | Size | Author |
---|---|---|---|
#10 | 1179356.ctools.edit-not-in-tabs.patch | 519 bytes | joachim |
Comments
Comment #1
kylebrowning CreditAttribution: kylebrowning commentedUnfortunately this a CTools thing.
Comment #2
joachim CreditAttribution: joachim commentedLet's move it to CTools then, as it makes the UI pretty awkward to use.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedI don't understand. What's wrong here?
Comment #4
joachim CreditAttribution: joachim commentedThe exportable thing, in this case a service, is using the CTools exportable UI AFAIK.
In the list of all things, there is a dropdown that says:
- edit
- resources
- authentication
- ... [others too]
The paths to do stuff with a particular thing are of this form:
- admin/structure/services/list/NAME/edit -- edit page
- admin/structure/services/list/NAME/resources -- resources settings page
- admin/structure/services/list/NAME/authentication -- authentication settings page
All of these sit in menu tabs so once you are on one, you can easily flip to the others. Except for the edit page, which has no tabs at all.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedStrange. It's defined as the default local task:
Comment #6
merlinofchaos CreditAttribution: merlinofchaos commentedMaybe the issue is the %? If they don't match exactly, Drupal won't see them as being in the same tabset.
You can either change the % placeholder you're using, or define 'tab root' or 'tab parent' (I forget, it's kind of a weird system).
Comment #7
joachim CreditAttribution: joachim commentedIt's the edit page that seems to be at fault though. The others have a correct breadcrumb, whereas the edit page only has 'home'.
Interestingly, the menu_router table has entries with only % wildcards, not %ctools_export_ui as I expected, like this:
admin/structure/services/list/%/edit
All the other items get this as both their tab root and tab parent:
admin/structure/services/list/%
However, the edit page has the root set to itself, ie 'admin/structure/services/list/%/edit', but nothing for parent.
(BTW, probably another bug, but setting tab root or parent in the $plugin definition does not respect the menu prefix...)
Also, the type of the other items is 132, but for the edit page it's 0.
Comment #8
merlinofchaos CreditAttribution: merlinofchaos commentedAre you running into the bug that Views ran into where the parentage can be set wrong because menu items get created when the schema is wrong? What happens if you clear the menu_links table for all 'services' links, then perform a menu rebuild? Does that fix the situation?
Also, the menu router table will omit the identifier from all % in the path, but that's still used (I think) when determining tab parentage. I'm...not actually sure I'm correct on that last part, though.
Comment #9
joachim CreditAttribution: joachim commentedThe problem seems to be this in ctools' export-ui.inc:
Comment #10
joachim CreditAttribution: joachim commentedHere's a patch that fixes the problem in Services for me. The weight of -10 ensures the edit tab is the first, and gives implementing modules room to start their weights at 0.
Comment #11
joachim CreditAttribution: joachim commentedComment #12
merlinofchaos CreditAttribution: merlinofchaos commentedHow come your paste in #9 does not match my paste in #5? It seems unlikely that I don't have the latest code...
Comment #13
joachim CreditAttribution: joachim commentedIt certainly does seem odd...
My git clone says:
(The diff of the modified file being what I just uploaded as a patch :)
Comment #14
merlinofchaos CreditAttribution: merlinofchaos commentedWeird. I guess I *didn't* have the latest code in the branch I c&p'd that from.
I went back to menu default local task. Maybe I changed that while trying to figure out the weird problems i was having with breadcrumbs.