User tests: Successful: Unsuccessful:
See issue #7051
This PR is a fix for backend (I think frontend has a similiar issue).
Test instructions
Pagination doesn't work Always page 1.
Apply patch and try again. Also reset search filter, change limit box, pagination start and so on to play it safe.
Please don't forget to test template Hathor, too.
Category | ⇒ | Administration |
Status | New | ⇒ | Pending |
Easy | No | ⇒ | Yes |
Labels |
Added:
?
|
Labels |
Added:
?
|
It works, but has the downside that it also no longer resets the pagination if you change the search filter. It will stay on the last selected page.
The real issue is that getUserStatefromRequest
is useless at least in Isis as it will return the old value, not the new one (it doesn't find the new one as it's in the filter array). While doing so, it also thinks something changed and resets the pagination.
The proper states are then set after in the parent::populateState method.
By the way, the same issue is happening with the other filters like access, published, ...
I know that there were some issues and PRs that tried to solve defect pagination. None was merged.
I think @phproberto tried to find a more elegant solution for this. I didn't understand what the problem was then.
I have never understood why pagination must be resetted and I think it's better to have a temporarily solution that allows to paginate with Hathor and Isis instead of a completely unusable pagination. Not resetting pagination makes less problems, at least at the moment (BTW: Some like it, some not. I personally am annoyed by resetted paginations since ever ;-) ).
#6548 (closed, @joomdonation )
#6677 (closed)
Hmm
If you look at at the commit in my PR joomdonation@d778c23, you will see that we can solve the issue by just removing some un-necessary line of codes .
These line of codes just needed for hathor template because hathor doesn't use search tools and it uses different name for states variable (for example hathor uses filter_search instead of filter[search] like in search tool).
At that time, I was thinking about modify hathor layout so that it uses the same name for filter variables and we can safe remove un-necessary code and got the issue fixed at the same time
However, @phproberto proposed a different PR, so I closed mine. Not sure why Robeto gave up it now (he closed his PR) and what's the plan for fixing this issue (pagination is broken in all Joomla core components, atleast from backend)
The one from Roberto is closed because he pulls himself out of Joomla and he closed all his PRs.
Feel free to propose a new one based on his work. I think what he did made sense.
I think the only thing which prevented it from being merged was that there was some Unit Tests failing.
I tested this and indeed, this works like it should - i tested both backend templates
Patch works fine
Status | Pending | ⇒ | Ready to Commit |
RTC. Based on testing #jab15 #makeithappen
Labels |
Added:
?
|
Labels |
Added:
?
|
I still think it's not a correct fix. It fixes one thing and breaks another one (resetting pagination when filter changes).
We either need to fix hathor so it uses the proper filter data or move the getUserState stuff down like was proposed by Roberto.
Labels |
Removed:
?
|
Labels |
Removed:
?
|
Labels |
Added:
?
|
Labels |
Added:
?
|
Fully agree.
Status | Ready to Commit | ⇒ | Pending |
Labels |
Removed:
?
|
Labels |
Removed:
?
|
I'll reopen my PR this week as soon as I finish the JLayout PR
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-06-21 06:04:13 |
Closed_By | ⇒ | zero-24 |
Issue confirmed. Patch works fine here.