- πΊπΈUnited States joshuasosa
I'm getting duplicate records displayed in my view on 2.1.3 due to draggableviews. Patch in #11 doesn't help.
- π§πͺBelgium tim-diels Belgium π§πͺ
This should actually be just an update hook to resave the items to the new structure instead of adding code that is not needed anymore afterwards?
- Status changed to Needs work
about 1 month ago 6:18am 13 May 2024 - π·πΊRussia marassa Moscow
This should actually be just an update hook to resave the items to the new structure instead of adding code that is not needed anymore afterwards?
@tim-diels: The problem here is that when looping through all records in an update hook out of view context, you have no way of knowing what the view args were when the record was saved.
- π§πͺBelgium tim-diels Belgium π§πͺ
I think the code goes over the necessary records and delete them. You could do the same in an update hook?
Isn't the problem just that records with '[]' are faulty and should be deleted? Just wondering if I'm thinking correct. - π·πΊRussia marassa Moscow
Isn't the problem just that records with '[]' are faulty and should be deleted?
Nope. The legacy records with '[]' work fine with new module version and views created earlier. If you simply delete them, you will lose the order set by draggable views. The problems only start if you open an old view for editing and save it. That's when a duplicate set of records is created with args set to actual args but the old records with '[]' are not removed creating the confusion.That's when it's a good time to remove legacy records for this specific view.
- π¨π¦Canada mandclu
I'm wondering if the change merged as part of π Call to a member function id() on null on $this->getEntity($row)->id() Fixed might prevent the duplicate records from being included in the form. Could someone test with the dev release?