#4134 (ok 4.1.0-rc1) After deleting all rows on a page, it returns to a blank page

4.0.8
fixed
None
1
2014-08-13
2013-10-14
No

To reproduce:

  1. Have a table that spans several pages in Browse mode.
  2. Go to the last page.
  3. Click "Check all" then delete those rows.

It then goes to a blank table. At the top it says "Your SQL query has been executed successfully" with the delete query below.
Then below that it says "Showing rows 720 - 719 (720 total, Query took 0.0014 sec)"
Then the query box - SELECT * FROM \table` LIMIT 720 , 30` (the table now had 720 rows after deletion).
Then the table headers but no rows of the table.

I would expect it to either go to the previous page (which is now the last page of the table), or maybe the first page. At least it should show some data.

Discussion

  • Abhishek Kandoi

    Abhishek Kandoi - 2013-10-16

    In my opinion, after deleting the rows, using the Check all, it should go to the previous page. This makes sense according to me.

    I am working on it and will probably send a pull request when done.

    What do others have to say about this?

     
  • Marc Delisle

    Marc Delisle - 2013-10-16

    Abhiskek,
    I agree with your suggestion.

     
  • Marc Delisle

    Marc Delisle - 2013-10-30

    Abhishek,
    any progress on this?

     
  • Hugues Peccatte

    Hugues Peccatte - 2013-11-05

    Hi,

    I sent a pull request to fix this bug ( https://github.com/phpmyadmin/phpmyadmin/pull/740 ).

    What does the fix?
    After deleting row(s) with multi actions submit, I compare the number of rows of the displayed table and the position of the first line to display. If number of rows <= position, position is updated.

    I know that this fix added an error in PHPUnit test. I had to include another file in the test class, but in this file and another one, there are 2 functions (that I didn't create) with the same name.
    Possibilities:
    - Rename one of them;
    - Factorize them;
    - Don't test (not a good way).

    I just didn't want to do a bug fix and update the functions in the same pull request.

    Hugues.

     
    Last edit: Hugues Peccatte 2013-11-05
  • Marc Delisle

    Marc Delisle - 2013-11-05
    • assigned_to: Marc Delisle
     
  • Marc Delisle

    Marc Delisle - 2013-11-05
    • summary: After deleting all rows on a page, it returns to a blank page. --> (ok 4.1.0-beta3) After deleting all rows on a page, it returns to a blank page
    • status: open --> resolved
    • Priority: 5 --> 1
     
  • Abhishek Kandoi

    Abhishek Kandoi - 2013-11-06

    Oh. Sorry Marc that I couldn't reply.
    I tried fixing this bug, but got caught up due to my end-term exams.
    But I am glad that it is fixed now.

     
  • Marc Delisle

    Marc Delisle - 2013-11-23
    • summary: (ok 4.1.0-beta3) After deleting all rows on a page, it returns to a blank page --> (ok 4.1.0-rc1) After deleting all rows on a page, it returns to a blank page
     
  • Marc Delisle

    Marc Delisle - 2013-12-12
    • Status: resolved --> fixed