User tests: Successful: Unsuccessful:
As raised in #6677, #7052 and some other issues we currently have an issue with pagination in views where Search Tools are implemented.
That is, you can't change to page 2, you're stuck on page 1.
The issue is that the Search Tools uses different names for the filter inputs as they are generated using JForm. Without Search Tools, the name was for example filter_published
, which became filter[published]
with Search Tools.
Now the model still checks for the old name since we still have layouts without Search Tools (Hathor overrides and modal layouts). However because the inputs aren't present in the case of Search Tools, the getUserStateFromRequest
doesn't find anything (null
). This method however also compares the old value to the new one and if it changed it resets the pagination. Which is what we experience.
The whole thing apparently only surfaced in Joomla 3.4.1 due to a bug fixed elsewhere in JRegistry.
This PR uses a bit of a hackish workaround which will try to retrieve the value from the Search Tools field in case the requested field starts with filter_
and contains no value.
This way, everything should work as expected and nothing should break.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Milestone |
Added: |
Category | ⇒ | Administration Front End Libraries |
Easy | No | ⇒ | Yes |
#test OK
Just to be clear: I was experiencing the original issue only with Isis, while Hator, modal insert article, and front-end were working OK also without this patch.
Patch fixes the issue in Isis.
Just to be clear: I was experiencing the original issue only with Isis, while Hator, modal insert article, and front-end were working OK also without this patch.
Yep, the issue is only present where Search Tools is active. Hathor and the modals don't have those and thus still use the old filtername style (filter_published
). Thus this works currently and should keep working after the patch. That's also why we need to keep the whole block with the getUserStateFromRequest stuff (https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_content/models/articles.php#L87-L109). If we could remove those lines, then the issue would be solved as well
Milestone |
Removed: |
Status | Pending | ⇒ | Ready to Commit |
Works fine here too. Even if hacky, looks like the simplest solution to be able to release 3.4.2.
RTC
Labels |
Added:
?
|
Milestone |
Added: |
Patch works fine. But I am not able to look after the code.
Works here, too. Tested with various search filters in Isis and Hathor (Bluestork, is broken anyway).
Bluestork, is broken anyway
Bluestork is the Joomla 2.5 template. It never was meant to work in J3. Just uninstall it
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-06-20 19:30:28 |
Closed_By | ⇒ | wilsonge |
Labels |
Removed:
?
|
@wilsonge This should do