Problem/Motivation
Unlike the default Drupal navigation, there is an edit item in the top tool bar that always is present and doesn't necessarily work.
Steps to reproduce
Steps:
1. Go to simplytest.me
2. Create two sites, one with just Drupal core and one with admin_toolbar 3.x-dev
3. Login as admin to both sites
4. Go to /admin/extend
5. In the site with admin_toolbar 3.x-dev installed, uninstall navigation
6. Compare the two sites
Expected result: Neither site shows Edit
Actual result: The admin toolbar version shows an edit item at the left of the top row. Clicking it does nothing.
7. Go to /user/1
8. Click Edit in the top row (the one with the pencil icon)
Expected result: Both sites go to /user/1/edit
Actual result: Only the Drupal core site goes to /user/1/edit. Nothing happens on the admin toolbar site.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3615311 after.png | 366.03 KB | csakiistvan |
| #4 | 3615311 before.mov | 375.33 KB | csakiistvan |
| #2 | 3615311-2.patch | 806 bytes | chaitanyadessai |
Comments
Comment #2
chaitanyadessai commentedPlease review patch.
Comment #3
csakiistvanComment #4
csakiistvan✅ Tested and works — applied patch #2, rebuilt caches, reloaded
/user/1: the pencil "Edit" tab is gone from the top row, and the rest of the toolbar is unaffected. The reported symptom is fixed.Comment #5
charles belovSorry for the delay. Tested as working.
Comment #6
dydave commentedThanks everyone for your help reporting this issue, it's greatly appreciated! 🙏
Thanks a lot István (@csakiistvan) for clearly documenting the issue with a small video and screenshots.
I'm not sure the patch from #2 is the solution ... It seems to just remove the link, when it should actually be linking to the user edit page....
These links are meant to be capturing local tasks, in particular on entity pages, such as the user view page.
Additionally, I'd like to take the opportunity to add a fix for the automated tests (PHPUNIT, 11.4 and above), probably in the same merge request.
Therefore, moving back issue to Active, for now.
I'll come back to it very soon to do a bit more testing and debugging.
Thanks again for your help and contributions.
Comment #7
charles belovIf it is intended to be on active on pages where it would actually do something (a user page or a content node), then it would also make sense to remove it from the page body and also move other such buttons such as View, Revisions (if enabled), and so on to the toolbar. I seem to recall Edit being present and the others being available through a three-dot drop-down. Not trying to engender scope creep, however - that might be a separate issue.