Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DATA LOSS with search + delete #83

Open
malaire opened this issue Jan 27, 2017 · 3 comments
Open

DATA LOSS with search + delete #83

malaire opened this issue Jan 27, 2017 · 3 comments
Labels

Comments

@malaire
Copy link

malaire commented Jan 27, 2017

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.

@shannah
Copy link
Owner

shannah commented Jan 27, 2017

Can you provide the following to help track this down?

  1. Post the URL of the search results. (the query string/portion after '?' is fine)
  2. Post the URL of each item's page that you opened in the browser tabs (query string fine)
  3. If you can share screen shots of each page that would be helpful too.

@shannah shannah added the bug label Jan 27, 2017
@malaire
Copy link
Author

malaire commented Jan 27, 2017

I just did a new test with clean 2.1.3 install to confirm this.

Exact steps:

  • create table 'Test' with fields 'TestID' and 'Title'
  • add 3 records to table, called 'First Item', 'Second Item', 'Third Item'
  • search with keyword 'Item', URL is:

...?-table=Test&-search=item&-action=list&-submit=Search+Test

  • open all 3 search results in new tabs, URLs are:

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

  • go to FIRST result tab and click 'Delete' button to get to confirmation page:

...?-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"?' !!!

  • confirm deletion, record 'Third Item' is deleted when I wanted to delete 'Second 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.

@itmuecke
Copy link

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 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants