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
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 2939166_11.patch | 2.62 KB | slashrsm |
| #10 | 2939166-10.patch | 2.89 KB | markhalliwell |
Comments
Comment #2
sriman commentedComment #3
markhalliwellPlease try the latest dev release.
Comment #4
sriman commentedComment #5
sriman commentedThanks for you support on this, will it be solved in the latest dev release, can I know the patch number for it
Comment #6
mathysp commentedUpgrading 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.
Comment #7
solariel commentedThe 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.
Comment #8
solariel commentedAdding a screenshot for clarity.
Comment #9
veronicaseveryn commentedI 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
Comment #10
markhalliwellComment #13
slashrsm commentedI 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.
Comment #14
slashrsm commentedI created a new issue for this: #3114383: Use random suffixes for dropbutton items HTML ID to prevent collisions