User tests: Successful: Unsuccessful:
Pull Request for Issue #19579
Patch parseSefRoute(&$uri) method in SiteRouter
to add current URL variables when
JRoute('&var=...')
Create a paginated home page
Visit home page and in addressbar also add
?hello=1&world=2
e.g. localhost/joomla3xtext/en/?hello=1&world=2
Look at the pagination (page) links, the should be
localhost/joomla3xtext/en/?hello=1&world=2&start=5
localhost/joomla3xtext/en/?hello=1&world=2&start=10
localhost/joomla3xtext/en/?start=5
localhost/joomla3xtext/en/?start=10
None
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
I have tested this item
Tested with 3.8.5-rc
Homepage
Browser URL: http://localhost/j385rc/index.php?test=1
Before patch: http://localhost/j385rc/index.php?start=5
After patch: http://localhost/j385rc/index.php?test=1&start=5
Another menu item:
Browser URL: http://localhost/j385rc/index.php/rsdirectory-list-entries?test=1
Before patch: http://localhost/j385rc/index.php/rsdirectory-list-entries?test=1&start=5
With patch: http://localhost/j385rc/index.php/rsdirectory-list-entries?test=1&start=5
All other menu items append the current query to the pagination URL, so IMO it was indeed a bug that needed fixing.
@franz-wohlkoenig @OctavianC
c97fdce
I did not achieve the desired effect. I tested it on 3.8.5 and I would do more tests.
Please pay attention to the test paging connection.
The above comes from software translation!
hhmm,
you may have some overriding of classes in your website,
so please test by using staging, and then applying patch using patch tester
then also in your own website try to execute in home page that has extra url variables:
echo 'TEST: ' . JRoute('&start=10') . '<br>';
@ztj1993 please mark your Test as successfully:
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
Sorry, not familiar with unit tests - any reason why this is failing?
There was 1 failure:
1) JRouterSiteTest::testParseSefRoute with data set "abs-raw-no_path-qs-no_sfx" ('?testvar=testvalue', 0, array(), array('45', 'com_test3', 'test3'), array('45', 'com_test3', 'test3'))
JRouterSite::parseSefRoute() did not return the expected values.
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
'Itemid' => '45'
'option' => 'com_test3'
'view' => 'test3'
+ 'testvar' => 'testvalue'
)
Should unit tests be updated or is this commit breaking something?
The unit test case is asserting that the expected query variables are present with the right values. This test case is failing because there is an additional query variable that it is not expecting. The test failure either indicates an unexpected code change or the test is no longer running a valid assertion and needs to be updated.
The test needs to be updated, since it was created by examing the current wrong behaviour
With this PR
'testvar' => 'testvalue'
is supposed to be added
i ll update the unit test case
Labels |
Added:
?
|
Labels |
Added:
?
|
Category | Libraries | ⇒ | Libraries Unit Tests |
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-02-26 03:18:57 |
Closed_By | ⇒ | mbabker |
I can not think of any negative side-effects, but please test cases that you think might be effected