? ? ? Pending

User tests: Successful: Unsuccessful:

avatar ggppdk
ggppdk
6 Feb 2018

Pull Request for Issue #19579

Summary of Changes

Patch parseSefRoute(&$uri) method in SiteRouter
to add current URL variables when

  • current page is the home page
  • and calling JRoute('&var=...')

Testing Instructions

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

Expected result

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

Actual result

localhost/joomla3xtext/en/?start=5
localhost/joomla3xtext/en/?start=10

Documentation Changes Required

None

avatar ggppdk ggppdk - open - 6 Feb 2018
avatar ggppdk ggppdk - change - 6 Feb 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Feb 2018
Category Libraries
avatar ggppdk ggppdk - change - 6 Feb 2018
The description was changed
avatar ggppdk ggppdk - edited - 6 Feb 2018
avatar ggppdk
ggppdk - comment - 6 Feb 2018

I can not think of any negative side-effects, but please test cases that you think might be effected

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Feb 2018

@ztj1993 can you please Test?

avatar OctavianC
OctavianC - comment - 6 Feb 2018

I have tested this item successfully on c97fdce

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.


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

avatar OctavianC OctavianC - test_item - 6 Feb 2018 - Tested successfully
avatar ztj1993
ztj1993 - comment - 7 Feb 2018

@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!

avatar ggppdk
ggppdk - comment - 7 Feb 2018

@ztj1993

Please test on an installation using staging branch

avatar ztj1993
ztj1993 - comment - 7 Feb 2018

@ggppdk
I am the direct modification of the code, based on c97fdce

I just wrote a jQuery plug-in, and I've been testing the time.

avatar ggppdk
ggppdk - comment - 7 Feb 2018

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>';
avatar ztj1993
ztj1993 - comment - 7 Feb 2018

@ggppdk
I'm sorry, I made a low-grade mistake.
My local joomla project was too much, and I changed one project to test another project.
This patch is valid, thank you.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 7 Feb 2018

@ztj1993 please mark your Test as successfully:

  • open Issue Tracker
  • Login with your github-Account
  • Click on blue "Test this"-Button above Authors-Picture
  • mark your Test as successfully
  • hit "submit test result"
avatar ztj1993
ztj1993 - comment - 7 Feb 2018

I have tested this item successfully on c97fdce


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

avatar ztj1993 ztj1993 - test_item - 7 Feb 2018 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Feb 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 7 Feb 2018

Ready to Commit after two successful tests.

avatar OctavianC
OctavianC - comment - 7 Feb 2018

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?

avatar mbabker
mbabker - comment - 13 Feb 2018

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.

avatar ggppdk
ggppdk - comment - 13 Feb 2018

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

avatar ggppdk ggppdk - change - 16 Feb 2018
Labels Added: ?
avatar ggppdk ggppdk - change - 16 Feb 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 16 Feb 2018
Category Libraries Libraries Unit Tests
avatar ggppdk ggppdk - change - 16 Feb 2018
Labels Added: ?
avatar mbabker mbabker - change - 26 Feb 2018
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
avatar mbabker mbabker - close - 26 Feb 2018
avatar mbabker mbabker - merge - 26 Feb 2018

Add a Comment

Login with GitHub to post a comment