You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.
I'm having a strange error when trying to show all entries in a datatable.
This is my length_menu: 'length_menu' => [[10, 25, 50, 100, -1], ['10', '25', '50', '100', 'All'],
The dropdown shows the correct numbers and works for 10, 25, 50, 100 but not for "All" and it shows an error when reloading the page after setting the length to "All".
More detail:
Loading the page with the page length set to "10" and then switching to "All" will only show 50 entries (while having 2,5k in my DB).
The same applies to the other setting, the shown number is always "page_length * 5" (showing 125 when set to 25, reloading page, switching to "All", 250 with 50 and 500 with 100).
(If I don't reload the page, the maximum number stays the same, e.g. reload page with "10", set to "All" will show 50, not reloading the page but setting the length to 25 first and the again to "All" will again only show 50.)
Then: While the above only applies while reloading the page with a number set in the dropdown, if I set the dropdown to "All" and then reload the page, the query is somehow broken, I get an "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-5' at line 1" in the Symfony toolbar, the relevant part of the query being "ORDER BY m0_.id DESC LIMIT -5".
Can anybody reproduce this or lead me to a solution? Can't believe this has never happened to anybody, or is nobody using the "All"-option with page_length?
The text was updated successfully, but these errors were encountered:
Looked further, because the factor 5 struck me and found something: I'm setting the pipeline in the AJAX options ('pipeline' => 5), removing this will resolve the issue (but of course disable ajax caching which I'd like to use).
Still considering this a bug, so I'll leave this open.
Hi,
I'm having a strange error when trying to show all entries in a datatable.
This is my length_menu:
'length_menu' => [[10, 25, 50, 100, -1], ['10', '25', '50', '100', 'All'],
The dropdown shows the correct numbers and works for 10, 25, 50, 100 but not for "All" and it shows an error when reloading the page after setting the length to "All".
More detail:
Loading the page with the page length set to "10" and then switching to "All" will only show 50 entries (while having 2,5k in my DB).
The same applies to the other setting, the shown number is always "page_length * 5" (showing 125 when set to 25, reloading page, switching to "All", 250 with 50 and 500 with 100).
(If I don't reload the page, the maximum number stays the same, e.g. reload page with "10", set to "All" will show 50, not reloading the page but setting the length to 25 first and the again to "All" will again only show 50.)
Then: While the above only applies while reloading the page with a number set in the dropdown, if I set the dropdown to "All" and then reload the page, the query is somehow broken, I get an "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-5' at line 1" in the Symfony toolbar, the relevant part of the query being "ORDER BY m0_.id DESC LIMIT -5".
Can anybody reproduce this or lead me to a solution? Can't believe this has never happened to anybody, or is nobody using the "All"-option with page_length?
The text was updated successfully, but these errors were encountered: