Open malaire opened 7 years ago
Can you provide the following to help track this down?
I just did a new test with clean 2.1.3 install to confirm this.
Exact steps:
...?-table=Test&-search=item&-action=list&-submit=Search+Test
...?-table=Test&-search=item&-action=browse&-submit=Search+Test&-cursor=0&-skip=0&-limit=30&-mode=list&-recordid=Test%3FTestID%3D1 ...?-table=Test&-search=item&-action=browse&-submit=Search+Test&-cursor=1&-skip=0&-limit=30&-mode=list&-recordid=Test%3FTestID%3D2 ...?-table=Test&-search=item&-action=browse&-submit=Search+Test&-cursor=2&-skip=0&-limit=30&-mode=list&-recordid=Test%3FTestID%3D3
...?-table=Test&-search=item&-action=delete&-submit=Search+Test&-cursor=0&-skip=0&-limit=30&-mode=list&-recordid=Test%3FTestID%3D1&-delete-one=1
confirm deletion, record 'First Item' is deleted successfully
go to SECOND result tab and click 'Delete' button to get to confirmation page:
...?-table=Test&-search=item&-action=delete&-submit=Search+Test&-cursor=1&-skip=0&-limit=30&-mode=list&-recordid=Test%3FTestID%3D2&-delete-one=1
!!! THIS PAGE IS WRONG, it is asking 'Are you sure you want to delete this record: "Third Item"?' !!!
It seems that Xataface is using search-parameters to decide which record to delete, and completely ignoring '-recordid' in the URL. So when first record from search is deleted, the subsequent deletions will delete wrong records.
I can confirm this also. My workaround: reload search result after each delete. But even than deletion feels risky. Lost a lot of data due to this bug :(
I just noticed a serious data loss when doing following steps:
1) have a table with several items 2) do search which returns several items 3) open few items from search results into new browser tabs 4) go through those browser tabs and delete each item
In step 4, sometimes wrong items are being deleted, and not those which were selected from search results.