RTC bug PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
6 Sep 2024

Summary of Changes

Existing approach still have a problem, it is always forcing the parameters defined in $defaultUrlParams, and make it impossible to remove.

I suggest a different approach, take the allowed parameters from the router, and filtering them before adding. Also this now happen in the pagination constructor, which allows for developers to unset unneeded params.

Testing Instructions

Code review. Test with your component.

Or, add following code, somewhere here

<?php
$pg = new \Joomla\CMS\Pagination\Pagination(100, 0, 20);
$pg->setAdditionalUrlParam('tmpl', null);
echo $pg->getPaginationLinks();
?>

Then open any page with ?tmpl=index in URL, and check pagination links.

Actual result BEFORE applying this Pull Request

Somehow works.

Pagination links contain ?tmpl=index .

Expected result AFTER applying this Pull Request

Works but better.

Pagination links without ?tmpl=index .

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar Fedik Fedik - open - 6 Sep 2024
avatar Fedik Fedik - change - 6 Sep 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Sep 2024
Category Libraries
ad04da5 6 Sep 2024 avatar Fedik cs
avatar Fedik Fedik - change - 6 Sep 2024
Labels Added: bug PR-4.4-dev
avatar Fedik Fedik - change - 6 Sep 2024
The description was changed
avatar Fedik Fedik - edited - 6 Sep 2024
avatar Fedik Fedik - change - 6 Sep 2024
The description was changed
avatar Fedik Fedik - edited - 6 Sep 2024
avatar Fedik Fedik - change - 6 Sep 2024
The description was changed
avatar Fedik Fedik - edited - 6 Sep 2024
avatar SniperSister
SniperSister - comment - 7 Sep 2024

This PR re-introduces the issue that was fixed in the security release.

avatar Fedik Fedik - change - 8 Sep 2024
The description was changed
avatar Fedik Fedik - edited - 8 Sep 2024
avatar Fedik
Fedik - comment - 8 Sep 2024

I updated the PR, it now takes only allowed parameters.

avatar PhocaCz
PhocaCz - comment - 10 Sep 2024

Testing now, after getting more information, it seems to be working fine for me. I will do more tests to confirm this PR. Thank you.

avatar PhocaCz PhocaCz - test_item - 12 Sep 2024 - Tested successfully
avatar PhocaCz
PhocaCz - comment - 12 Sep 2024

I have tested this item ✅ successfully on 097ef2e


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

avatar n3t n3t - test_item - 12 Sep 2024 - Tested unsuccessfully
avatar n3t
n3t - comment - 12 Sep 2024

I have tested this item 🔴 unsuccessfully on 097ef2e

When going to page 2, link to first page in pagination contains parameter start=0. It should contain no start parameter (null).


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

avatar n3t
n3t - comment - 12 Sep 2024

Generally this aproach is much better than the hardcoded one introduced in 4.4.7, however doesn't solve the whole issue. start=0 would lead to duplicate pages issues, search engines wouldn't be happy :(


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

avatar Fedik
Fedik - comment - 13 Sep 2024

@n3t your test is unrelated to current PR.
For fixing start=0 there need a separated fix. Please test #44069

avatar Fedik Fedik - change - 13 Sep 2024
Title
Check pagination parameters from request, another try
[4.4] Check pagination parameters from request, another try
avatar Fedik Fedik - edited - 13 Sep 2024
avatar n3t n3t - test_item - 15 Sep 2024 - Tested successfully
avatar n3t
n3t - comment - 15 Sep 2024

I have tested this item ✅ successfully on 399ab15

In combination with patch #44069 this works as expected.


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

avatar Quy Quy - alter_testresult - 15 Sep 2024 - PhocaCz: Tested successfully
avatar Quy Quy - change - 15 Sep 2024
Status Pending Ready to Commit
avatar Quy
Quy - comment - 15 Sep 2024

RTC


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

avatar Quy Quy - change - 20 Sep 2024
Labels Added: RTC
avatar MacJoom MacJoom - close - 23 Sep 2024
avatar MacJoom MacJoom - merge - 23 Sep 2024
avatar MacJoom MacJoom - change - 23 Sep 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-09-23 07:23:34
Closed_By MacJoom
avatar MacJoom
MacJoom - comment - 23 Sep 2024

Thank you!

Add a Comment

Login with GitHub to post a comment