? Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
18 Jun 2015

Issue

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.

Background

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.

Proposes solution

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.

Testing

  • Use for example the article manager to reproduce the issue: Apply a filter and try to go to the second page. You will be stuck on page 1.
  • Apply patch and try again, now it should work.
  • Try also with Hathor (uses Overrides) and the modal layout which is used when you try to insert an article into an article using the editor button.
  • Check also frontend lists.

Votes

# of Users Experiencing Issue
0/1
Average Importance Score
3.00

avatar Bakual Bakual - open - 18 Jun 2015
avatar Bakual Bakual - change - 18 Jun 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jun 2015
Labels Added: ?
avatar Bakual
Bakual - comment - 18 Jun 2015

@wilsonge This should do :smile:

avatar Bakual Bakual - change - 18 Jun 2015
Milestone Added:
avatar zero-24 zero-24 - change - 18 Jun 2015
Category Administration Front End Libraries
avatar zero-24 zero-24 - change - 18 Jun 2015
Easy No Yes
avatar smz smz - test_item - 18 Jun 2015 - Tested successfully
avatar smz
smz - comment - 19 Jun 2015

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

avatar Bakual
Bakual - comment - 19 Jun 2015

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

avatar infograf768 infograf768 - test_item - 19 Jun 2015 - Tested successfully
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jun 2015
Milestone Removed:
avatar infograf768 infograf768 - change - 19 Jun 2015
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 19 Jun 2015

Works fine here too. Even if hacky, looks like the simplest solution to be able to release 3.4.2.

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7194.

avatar zero-24 zero-24 - change - 19 Jun 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 19 Jun 2015
Milestone Added:
avatar Worti2
Worti2 - comment - 19 Jun 2015

Patch works fine. But I am not able to look after the code.

avatar ghazal
ghazal - comment - 20 Jun 2015

@test
works OK here.

avatar Gitjk
Gitjk - comment - 20 Jun 2015

Works here, too. Tested with various search filters in Isis and Hathor (Bluestork, is broken anyway).

avatar Bakual
Bakual - comment - 20 Jun 2015

Bluestork, is broken anyway

Bluestork is the Joomla 2.5 template. It never was meant to work in J3. Just uninstall it :smile:

avatar wilsonge wilsonge - reference | fb92710 - 20 Jun 15
avatar wilsonge wilsonge - merge - 20 Jun 2015
avatar wilsonge wilsonge - close - 20 Jun 2015
avatar zero-24 zero-24 - close - 20 Jun 2015
avatar wilsonge wilsonge - close - 20 Jun 2015
avatar wilsonge wilsonge - change - 20 Jun 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-06-20 19:30:28
Closed_By wilsonge
avatar Bakual Bakual - head_ref_deleted - 20 Jun 2015
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment