? Pending

User tests: Successful: Unsuccessful:

avatar philip-sorokin
philip-sorokin
10 Sep 2016

Summary of Changes

Reduce the number of page duplicates in com_content categories when pagination is used.

Testing Instructions

https://www.joomla.org/announcements.html?start=999999999999999999999 - it opens, while it should not. With this patch applied, pages will open if they really exist: https://www.joomla.org/announcements.html?start=390 - this will be the last page.

avatar addondev addondev - open - 10 Sep 2016
avatar addondev addondev - change - 10 Sep 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Sep 2016
Category Front End Components
avatar joomla-cms-bot joomla-cms-bot - change - 10 Sep 2016
Labels Added: ?
avatar zero-24
zero-24 - comment - 10 Sep 2016

@addondev can you fix the if syntax and add a space bettween the if and the openeing (

FILE: ...ld/joomla/joomla-cms/components/com_content/views/archive/view.html.php
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
 86 | ERROR | Expected "if (...)\n...{...}\n...else\n"; found
    |       | "if(...)\n...{...}\n...else\n"
--------------------------------------------------------------------------------
UPGRADE TO PHP_CODESNIFFER 2.0 TO FIX ERRORS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...d/joomla/joomla-cms/components/com_content/views/category/view.html.php
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
 125 | ERROR | Expected "if (...)\n...{...}\n...else\n"; found
     |       | "if(...)\n...{...}\n...else\n"
--------------------------------------------------------------------------------
UPGRADE TO PHP_CODESNIFFER 2.0 TO FIX ERRORS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...d/joomla/joomla-cms/components/com_content/views/featured/view.html.php
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
 117 | ERROR | Expected "if (...)\n...{...}\n...else\n"; found
     |       | "if(...)\n...{...}\n...else\n"
--------------------------------------------------------------------------------
UPGRADE TO PHP_CODESNIFFER 2.0 TO FIX ERRORS AUTOMATICALLY
--------------------------------------------------------------------------------

https://travis-ci.org/joomla/joomla-cms/jobs/159016449

avatar addondev
addondev - comment - 15 Sep 2016

Can you test it, please?

avatar brianteeman
brianteeman - comment - 16 Sep 2016

Is it the intended behaviour of this pr that ?start=999999999999999999999 gives a 404?


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

avatar addondev
addondev - comment - 16 Sep 2016

Yes, it does.

avatar philip-sorokin
philip-sorokin - comment - 20 Sep 2016

The same behaviour you can see in the content_pagebreak plugin - if an article page does not exist, it gives a 404. Why not apply this approach to category blogs? When you have 200 pages, search engines index them, then you change the item per page number and 200 becomes 100. The problem is that the other 100 pages no longer exist, but they cannot be removed from search index without editing robots.txt/htaccess. I think it is very inconvenient.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Jan 2017

I have tested this item 🔴 unsuccessfully on 504c948

With or -out patch pages open. Example: Show 1 of 2 Pages, append in URL ?start=99999999 – always 2 (the last page) is shown.


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 11 Jan 2017 - Tested unsuccessfully
avatar philip-sorokin
philip-sorokin - comment - 11 Apr 2017

@franz-wohlkoenig

I use the RC demo pages (featured view). I set in the menu params the following configuration to make pagination:

Leading Articles - 1
Intro Articles - 1
Columns - 1
Links - 1

When I open page 4 that does not have any items, I get the 404. Could you, please, describe your testing instructions?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Apr 2017

@philip-sorokin Test Instructions shown in opened Comment.

avatar philip-sorokin
philip-sorokin - comment - 11 Apr 2017

@franz-wohlkoenig
Can you give me a link to this comment. I am sorry, can't find it.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Apr 2017

on Top of this Thread, its your opening Comment about Issue.

avatar philip-sorokin
philip-sorokin - comment - 11 Apr 2017

Still can't see any comments.

comment

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Apr 2017

what i mean is:
bildschirmfoto 2017-04-11 um 07 34 24

avatar philip-sorokin
philip-sorokin - comment - 11 Apr 2017

@franz-wohlkoenig
This is my testing instructions, I thought you would write yours. Please, give me more details on the failure, because I tested it with 3 views successfuly:

-archive
-category
-featured

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Apr 2017

I used your Instructions for Test. Have to retest, my Test is too long ago to remember.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Apr 2017

Test on "Archive". 9 archived Articles (5 en-GB, 4 All Lang.), Menu set on Lang. "en-GB".

1/4. Call menu, Pagination show 1/2 (expected):

1

2/4. Click Pagnation 2/2, Url change to index.php/en/archived-articles?start=5 (expected):

2

3/4. Change Url to index.php/en/archived-articles?start=6 (unexpected – Articles with Lang.: All are shown):

3

4/4. Change Url to index.php/en/archived-articles?start=9 (expected – 404

4

avatar philip-sorokin
philip-sorokin - comment - 11 Apr 2017

And what is your conclusion? What about other views?

avatar joomla-cms-bot joomla-cms-bot - change - 13 May 2017
Category Front End Components Front End com_content Components
avatar joomla-cms-bot joomla-cms-bot - change - 13 May 2017
Category Front End Components com_content Front End com_content Libraries Components
avatar wojsmol
wojsmol - comment - 13 May 2017

@philip-sorokin @franz-wohlkoenig don't expect this

3/4. Change Url to index.php/en/archived-articles?start=6 (unexpected – Articles with Lang.: All are shown):

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 13 May 2017

@wojsmol didn't get what you mean.

avatar wojsmol
wojsmol - comment - 13 May 2017

@franz-wohlkoenig See #12004 (comment) first question

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 13 May 2017

I have no Conclusion cause no Knowledge.

avatar philip-sorokin
philip-sorokin - comment - 14 Jan 2018

I am closing this PR as it is not going to be merged.

avatar philip-sorokin philip-sorokin - change - 14 Jan 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-01-14 08:04:32
Closed_By philip-sorokin
avatar philip-sorokin philip-sorokin - close - 14 Jan 2018

Add a Comment

Login with GitHub to post a comment