Steps to recreate

1. Create new item
2. Come back back to list
3. if we click edit from operations of 3 rd or 4th row, navigated to 1st item. even though href value is populated for 3rd or 4 th row content

Comments

sriman created an issue. See original summary.

sriman’s picture

markhalliwell’s picture

Version: 8.x-4.x-dev » 8.x-3.x-dev
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)
Issue tags: -Usability

Please try the latest dev release.

sriman’s picture

StatusFileSize
new431.44 KB
sriman’s picture

Thanks for you support on this, will it be solved in the latest dev release, can I know the patch number for it

mathysp’s picture

Upgrading to latest dev does not solve this.

How to reproduce:
* Make sure you have a table-view with bootstrap dropdown buttons (edit/delete/...)
* Do these steps on this view:

1) Edit a node, save it (= item 1)(changes don't matter, only save)
2) Edit a different node, save it (= item 2)
3) Click edit button from item 2. You will arrive at the node/edit page of item 1.

solariel’s picture

The problem is with the "data-dropdown-target" data-attribute. It is targeting wrong id because of views caches.
Clearing caches solves the issue.

Another set of steps to reproduce:
1. Create a view with operation links (tested on table)
2. Make a change that will result in adding another row to the table. "data-dropdown-target" on different dropdowns becomes messed up.
3. Clear caches and reload the view. Everything is OK.

Seems that views cache each row separately and dropdowns are not updated properly on each displayed data change.

solariel’s picture

StatusFileSize
new124.88 KB

Adding a screenshot for clarity.

veronicaseveryn’s picture

Status: Postponed (maintainer needs more info) » Needs work

I have 3+ table style views displaying different entities (nodes and custom entities in different tables) on the same page. All Views have "operational links" field on them displayed as Dropdown bootstrap buttons.

All of my views have Tag-based caching enabled + AJAX enabled for pagination. When the site is utilized without caching in place, the IDs for dropdown links are generated as unique and dropdown targets are working.

When caching is turned on, I start seeing issues where multiple elements on the page get the same ID, which results in "data-dropdown-target" firing on the first found element with corresponding ID (from the beginning of the DOM structure).

Tested on both Bootstrap 8.x-3.14 and 8.x-3.11

markhalliwell’s picture

Title: Whle clicking *edit* dropdown from operations of drupal list, navigates to wrong content » Clicking "edit" dropdown button navigates to incorrect content
Status: Needs work » Fixed
StatusFileSize
new2.89 KB

  • markcarver committed 7f50d34 on 8.x-3.x
    Issue #2939166 by markcarver, sriman, solariel: Clicking "edit" dropdown...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

slashrsm’s picture

StatusFileSize
new2.62 KB

I ran into this issue even with the patch from #10. I have a page with two views, both with entity operations links. Sometimes it happens that I get same timestamp/ID on both views and then the links stop working. I am not sure why Html::getUniqueId() isn't picking this up and adding a suffix at the end. It is really hard to debug this as it sometimes appears and sometimes not.

I propose to use cryptographically secure random string as a suffix. This should prevent collisions for good I think.

slashrsm’s picture