User tests: Successful: Unsuccessful:
Pull Request for Issue #19409
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');
Restore one unit test from 3.8.3 and add a new one.
Fix the form action link. This helps when we go to the archive view without any menu item like index.php/component/content/archive
.
I updated the test instruction to facilitate testing.
index.php/archived-articles
Limit
field from All
to 5.index.php/archived-articles
beez3
(administrator/index.php?option=com_templates&view=styles
) and check second page again. It still works.Archived Articles
and go to index.php/component/content/archive
, set limit to 5.Pagination works.
Pagination does not work,
No
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_content Libraries Unit Tests |
How can I repeat it. What routing version and template?
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.
I have tested this item
I will do it
Title |
|
This PR should be added to 3.8.4 milestone.
If it hits RTC I'll merge it.
@infograf768 @senderdc Can you please test? Thanks.
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
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.
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.
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.
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.
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
...
This is with your PR.
I will check it again and record some video.
I added a video at https://drive.google.com/file/d/1ugWTCfp27J9XMTDQFKoQhgrRfj8xpySm/view
I have tested this item
Works now, don't ask me why...
Status | Pending | ⇒ | Ready to Commit |
RTC.
@mbabker OK for me.
RTC.
@mbabker OK for me.
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:
?
|
Thanks
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