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

Comments

charles belov created an issue. See original summary.

chaitanyadessai’s picture

Status: Active » Needs review
StatusFileSize
new806 bytes

Please review patch.

csakiistvan’s picture

Assigned: Unassigned » csakiistvan
csakiistvan’s picture

Assigned: csakiistvan » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new375.33 KB
new366.03 KB

✅ 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.

charles belov’s picture

Sorry for the delay. Tested as working.

dydave’s picture

Status: Reviewed & tested by the community » Active

Thanks 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.

charles belov’s picture

If 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.