? ? ? Pending

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
27 Jan 2018

Summary of Changes

SEO impovement for views with pagination.

Add an option to not generate/build URL with empty limitstart - &limitstart=0

I added a few changes in com_content component to show how it can work.

Changes in pagebreak plugin:

  • remove empty &showall= - if someone will see a problem then I will revert it.
  • remove empty &limitstart=

Testing Instructions

I encourage to review the code. Any improvement is welcome.

You can test a new pagination option on article/category/featured/archive views.

Expected result

No more &limitstart=0 or &start=0 in com_content component

Documentation Changes Required

Every 3rd party extension can enable this feature in model or view by adding:

// Flag indicates to not add `&limitstart=` or `&limitstart=0` to URL
$pagination->hideEmptyLimitstart = true;
avatar csthomas csthomas - open - 27 Jan 2018
avatar csthomas csthomas - change - 27 Jan 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jan 2018
Category Front End com_content Libraries Plugins
avatar csthomas csthomas - change - 27 Jan 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jan 2018
Category Front End com_content Libraries Plugins Front End com_contact com_content com_finder com_newsfeeds com_search com_tags Libraries Plugins
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jan 2018
Category Front End com_content Libraries Plugins com_contact com_finder com_newsfeeds com_search com_tags Front End com_contact com_content com_finder com_newsfeeds com_search com_tags Libraries Plugins Unit Tests
avatar csthomas
csthomas - comment - 27 Jan 2018

Now all should work as expected without any B/C break.

Affected views:

  1. com_content/category
  2. com_content/featured
  3. com_content/article (plugin pagebreak)
  4. com_content/archive
  5. com_contact/category
  6. com_contact/featured
  7. com_newsfeeds/category
  8. com_search/search
  9. com_finder/search
  10. com_tags/tags
  11. com_tags/tag

Every 3rd party extension can enable that option in model or view by adding:

// Flag indicates to not add limitstart=0 to URL
$pagination->hideEmptyLimitstart = true;
avatar Quy
Quy - comment - 27 Jan 2018

Please apply to Tagged items.

avatar csthomas csthomas - change - 27 Jan 2018
Labels Added: ?
avatar csthomas
csthomas - comment - 27 Jan 2018

Done

avatar Quy
Quy - comment - 28 Jan 2018

Notice: Undefined variable: page_prev in \plugins\content\pagebreak\pagebreak.php on line 374

avatar csthomas
csthomas - comment - 28 Jan 2018

Fixed

avatar Quy
Quy - comment - 29 Jan 2018

I have tested this item successfully on 4c8c189


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

avatar Quy Quy - test_item - 29 Jan 2018 - Tested successfully
avatar csthomas csthomas - change - 6 Feb 2018
Title
Add an option in Pagination class to not generate URL with limitstart=0
Add an option in Pagination class to generate URL without limitstart=0
avatar csthomas csthomas - edited - 6 Feb 2018
avatar csthomas
csthomas - comment - 9 Feb 2018

@Bakual Could you approve this PR? Could it go to 3.8?

avatar Bakual
Bakual - comment - 9 Feb 2018

@csthomas Technically it's a new feature and thus can't go into 3.8.x. It has to go into 3.9.0.
The code related to the pagination itself looks fine to me. I barely know the pagebreak plugin so I can't comment much there.
If it works for all affected views and that plugin, then it's fine 😄

avatar csthomas
csthomas - comment - 10 Feb 2018

This PR requires one more human test.

avatar joomdonation
joomdonation - comment - 11 Feb 2018

I have tested this item successfully on 4c8c189

Tested with Category Blog menu option, tested page break plugin, too


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

avatar joomdonation joomdonation - test_item - 11 Feb 2018 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Feb 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Feb 2018

Ready to Commit after two successful tests.

avatar csthomas csthomas - change - 30 Jun 2018
The description was changed
avatar csthomas csthomas - edited - 30 Jun 2018
avatar csthomas
csthomas - comment - 30 Jun 2018

Can we consider milestone Joomla 3.9.0 once again?

avatar mbabker
mbabker - comment - 7 Jul 2018

@csthomas After changing the base branch to 3.9-dev to try merging there are some merge conflicts in the pagebreak plugin.

avatar csthomas csthomas - change - 7 Jul 2018
Labels Added: ? ?
Removed: ?
avatar csthomas
csthomas - comment - 7 Jul 2018

OK, merged

avatar csthomas
csthomas - comment - 9 Jul 2018

Be aware that $this->assertEquals(); is not a strict comparison (== vs ===), and both ...->active = '' or ...-> active = false will pass unit tests.

avatar mbabker
mbabker - comment - 9 Jul 2018

IIRC that's why $this->assertSame(); is the recommended approach (it does do (more) strict comparison).

avatar csthomas
csthomas - comment - 9 Jul 2018

Yes, obviously.

Travis passed.
Javascript error is not related to this PR.

One more human test please if needed.

avatar csthomas csthomas - change - 9 Jul 2018
The description was changed
avatar csthomas csthomas - edited - 9 Jul 2018
avatar mbabker mbabker - change - 2 Aug 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-08-02 22:32:10
Closed_By mbabker
avatar mbabker mbabker - close - 2 Aug 2018
avatar mbabker mbabker - merge - 2 Aug 2018

Add a Comment

Login with GitHub to post a comment