? Pending

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
20 Jan 2018

Pull Request for Issue #19409

Summary of Changes

  1. This is a regression for #19099 at file libraries/src/Router/SiteRouter.php.
    If a new URL does not have an option, nor Itemid then use global Itemid.
    Affects the relative URL, such as:
    JRoute::_('&page=2');
    JRoute::_('index.php');

  2. Restore one unit test from 3.8.3 and add a new one.

  3. Fix the form action link. This helps when we go to the archive view without any menu item like index.php/component/content/archive.

Testing Instructions

I updated the test instruction to facilitate testing.

  1. Install staging joomla with sample data "Test English (GB) Sample Data"
  2. Archive 5 articles. In total should be more than 5.
  3. Go to the archive view index.php/archived-articles
  4. Change Limit field from All to 5.
  5. Click on the second page, before PR you get error 404.
  6. Apply patch and refresh index.php/archived-articles
  7. As you have limit 5 you can go to the next page.
  8. Second page works.
  9. Change default template to beez3 (administrator/index.php?option=com_templates&view=styles) and check second page again. It still works.
  10. Unpublish menu item Archived Articles and go to index.php/component/content/archive, set limit to 5.
  11. Go to second page, it still works.

Expected result

Pagination works.

Actual result

Pagination does not work,

Documentation Changes Required

No

avatar csthomas csthomas - open - 20 Jan 2018
avatar csthomas csthomas - change - 20 Jan 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jan 2018
Category Front End com_content Libraries Unit Tests
avatar csthomas csthomas - change - 20 Jan 2018
The description was changed
avatar csthomas csthomas - edited - 20 Jan 2018
avatar csthomas csthomas - change - 20 Jan 2018
The description was changed
avatar csthomas csthomas - edited - 20 Jan 2018
avatar csthomas csthomas - change - 20 Jan 2018
The description was changed
avatar csthomas csthomas - edited - 20 Jan 2018
avatar csthomas csthomas - change - 20 Jan 2018
The description was changed
avatar csthomas csthomas - edited - 20 Jan 2018
avatar csthomas csthomas - change - 20 Jan 2018
The description was changed
avatar csthomas csthomas - edited - 20 Jan 2018
avatar Quy
Quy - comment - 20 Jan 2018

Now the pagination link has the id assigned to the year.
http://localhost/joomla-cms-staging/using-joomla/extensions/components/content-component/archived-articles?month=1&id=2017&start=5

avatar csthomas
csthomas - comment - 20 Jan 2018

How can I repeat it. What routing version and template?

avatar Quy
Quy - comment - 20 Jan 2018

SEF on
URL Rewriting off
Protostar

Install Learn Joomla English (GB) Sample Data
Archive articles.
Enable Archived Articles module.
In the Archived Articles box, click January, 2018.
Click pagination link.

avatar csthomas
csthomas - comment - 20 Jan 2018

@Quy This problem exists at 3.8.3 too.

avatar csthomas csthomas - change - 20 Jan 2018
The description was changed
avatar csthomas csthomas - edited - 20 Jan 2018
avatar Quy
Quy - comment - 20 Jan 2018

I have tested this item successfully on 3655a6e


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

avatar Quy Quy - test_item - 20 Jan 2018 - Tested successfully
avatar Quy
Quy - comment - 20 Jan 2018

@csthomas PR #19397 fixes the id issue. Can you test it?

avatar csthomas
csthomas - comment - 20 Jan 2018

I will do it

avatar csthomas csthomas - change - 21 Jan 2018
Title
Regression at createUri from #19099
Regression in createUri
avatar csthomas csthomas - edited - 21 Jan 2018
avatar csthomas csthomas - change - 22 Jan 2018
The description was changed
avatar csthomas csthomas - edited - 22 Jan 2018
avatar csthomas
csthomas - comment - 22 Jan 2018

This PR should be added to 3.8.4 milestone.

avatar mbabker
mbabker - comment - 22 Jan 2018

If it hits RTC I'll merge it.

avatar Quy
Quy - comment - 22 Jan 2018

@infograf768 @senderdc Can you please test? Thanks.

avatar csthomas csthomas - change - 23 Jan 2018
The description was changed
avatar csthomas csthomas - edited - 23 Jan 2018
avatar infograf768
infograf768 - comment - 23 Jan 2018

I have an issue here in multilang. Protostar.
Page 2 when choosing 5 does not do a 404 but dislays empty (using module or menu item), before and after patch. Yes, I use last staging.
Link obtained is
http://localhost:8888/installmulti/trunkgitnew/index.php/fr/?month=12&year=0&start=5

avatar infograf768
infograf768 - comment - 23 Jan 2018

just a thought: this may be due to the fact that the home page is afeatured menu item.
if the archives articles are not set as featured, as the redirection is set without an itemid, the home menu item is used and displays nothing.

avatar Quy
Quy - comment - 23 Jan 2018

It is working for me.

Bad without PR: http://localhost/joomla-cms-staging/index.php/en/?month=1&year=2011&start=5

Good with PR: http://localhost/joomla-cms-staging/index.php/en/archived-articles/2011/1?view=archive&start=5

It appears your URL is the bad version.

avatar csthomas
csthomas - comment - 23 Jan 2018

The test instruction is different for multilingual at point 5 of test instruction, instead error 404 you get something like

Home

There are no articles in this category. If subcategories display on this page, they may contain articles.

Multilingual website use default menu item at index.php/fr/?month=12&year=0&start=5 and display the content featured view. For no multilingual website index.php/?month=12&year=0&start=5 does not use any menu item and display error 404.

That links display the same results at 3.8.3.

After applying patch go to index.php/fr/archived-articles again, (the first page) set limit 5 and click on filter to search again, then click on page 2, which should direct you to index.php/fr/archived-articles?view=archive&month=0&start=5 or index.php/fr/archived-articles/0/0?view=archive&start=5 (it depends on #19397).

After patch, you should not be redirected to invalid link index.php/fr/?month=12&year=0&start=5.
But the invalid link index.php/fr/?month=12&year=0&start=5 still generates the same empty page.

avatar infograf768
infograf768 - comment - 24 Jan 2018

I changed the Home to a category blog
I am not redirected to index.php/fr/archived-articles-fr?view=archive&month=0&start=5 here when using an archive menu item with alias archived-articles-fr

Same for the module.

If I change the Home page in French to a category blog, The only difference is that I get the usual (in French) There is no article in this category...etc.

Looking further into the issue when SEF is off, I found out that the itemId of the archived-articles-fr menu item is NOT used here when switching to start=5

First page with all archives is
index.php?option=com_content&view=archive&catid[0]=&Itemid=121&lang=fr

where Itemid=121 is correctly the archived-articles-fr Itemid.
and then when filtering by 5
index.php?option=com_content&view=category&layout=blog&id=9&Itemid=105&lang=fr&month=0&year=0&limitstart=5

where 105 is the Itemid here of the Home page

When using only the module (archive menu item unpublished)
/index.php?option=com_content&view=archive&year=2017&month=12&lang=fr
and filtering by 5
index.php?option=com_content&view=category&layout=blog&id=9&Itemid=105&lang=fr&month=12&year=2017&limitstart=5

When home is featured, one has to login and all archived articles set to featured to display the 5 next articles.

avatar infograf768
infograf768 - comment - 24 Jan 2018

This animated gif will show you what I get with SEF on
archive

avatar csthomas
csthomas - comment - 24 Jan 2018

I think you described the situation before this PR. If I'm wrong, I got lost somewhere.

Before PR:
When you clicked on the filter button then browser went to the wrong URL (index.php/fr) but display the correct archive view. It is because option and view are passed in POST request only.

In staging the form action link is generated from JRoute::_('index.php'), which does not work correctly and the result is index.php/fr/ instead of index.php/fr/archived-articles-fr.

In my PR (this is fixed), when there is a menu item, then JRoute::_('index.php') and JRoute::_('index.php?option=com_content&view=archive'); should work correctly and generates a link that starts with index.php/fr/archived-articles-fr ...

avatar infograf768
infograf768 - comment - 24 Jan 2018

This is with your PR.

avatar csthomas
csthomas - comment - 24 Jan 2018

I will check it again and record some video.

avatar csthomas
csthomas - comment - 24 Jan 2018

I added a video at https://drive.google.com/file/d/1ugWTCfp27J9XMTDQFKoQhgrRfj8xpySm/view

avatar infograf768
infograf768 - comment - 24 Jan 2018

I have tested this item successfully on 3655a6e

Works now, don't ask me why...


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

avatar infograf768 infograf768 - test_item - 24 Jan 2018 - Tested successfully
avatar infograf768 infograf768 - change - 24 Jan 2018
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 24 Jan 2018

RTC.

@mbabker OK for me.


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

avatar infograf768
infograf768 - comment - 24 Jan 2018

RTC.

@mbabker OK for me.


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

avatar mbabker mbabker - change - 24 Jan 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-01-24 15:26:50
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 24 Jan 2018
avatar mbabker mbabker - merge - 24 Jan 2018
avatar csthomas
csthomas - comment - 24 Jan 2018

Thanks

Add a Comment

Login with GitHub to post a comment