? Success

User tests: Successful: Unsuccessful:

avatar alexva24
alexva24
11 Apr 2016

Summary of Changes

While user is not authorized the com_user router builds the incorrect URL for user profile because JMenu::getItems() returns items available for only public access level.

Testing Instructions

$app = JFactory::getApplication();
$router = $app->getRouter();
$segments = $router->build('index.php?option=com_users&view=profile');
print_r($segments);
$vars = $router->parse($segments);
print_r($vars);

avatar alexva24 alexva24 - open - 11 Apr 2016
avatar alexva24 alexva24 - change - 11 Apr 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Apr 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 11 Apr 2016
Title
bug fix for com_user router
bug fix for com_user router
avatar brianteeman brianteeman - change - 11 Apr 2016
Category ACL Router / SEF
avatar andrepereiradasilva
andrepereiradasilva - comment - 12 Apr 2016

I'm not very well familiarized with this part of the code.
Need more clear test instructions to understand if this will have other impacts.

avatar alexva24
alexva24 - comment - 12 Apr 2016

This code changes only the profile URL and haven't other unwanted impacts.

avatar andrepereiradasilva
andrepereiradasilva - comment - 12 Apr 2016

Since the lack of clear test instructions i just made the dump suggested in protostar index.php before and after patch.

The results are:

Before patch

JUri Object
(
    [uri:protected] => index.php?option=com_users&view=profile
    [scheme:protected] => 
    [host:protected] => 
    [port:protected] => 
    [user:protected] => 
    [pass:protected] => 
    [path:protected] => /index.php/en/component/users/profile
    [query:protected] => 
    [fragment:protected] => 
    [vars:protected] => Array
        (
            [Itemid] => 
        )

)
Array
(
    [option] => com_users
    [view] => profile
    [Itemid] => 
    [lang] => en-GB
)

After patch

JUri Object
(
    [uri:protected] => index.php?option=com_users&view=profile
    [scheme:protected] => 
    [host:protected] => 
    [port:protected] => 
    [user:protected] => 
    [pass:protected] => 
    [path:protected] => /index.php/en/component/users/
    [query:protected] => 
    [fragment:protected] => 
    [vars:protected] => Array
        (
            [view] => profile
            [Itemid] => 
        )

)
Array
(
    [option] => com_content
    [view] => featured
    [Itemid] => 
    [lang] => en-GB
)
avatar RonakParmar
RonakParmar - comment - 30 Nov 2016

I have also applied this PR and got below result.

Before PR output:
JUri Object
(
[uri:protected] => index.php?option=com_users&view=profile
[scheme:protected] =>
[host:protected] =>
[port:protected] =>
[user:protected] =>
[pass:protected] =>
[path:protected] => /joomlacmsstaging/index.php/component/users/profile
[query:protected] =>
[fragment:protected] =>
[vars:protected] => Array
(
[Itemid] =>
)

)

Array
(
[option] => com_users
[view] => profile
[id] => 1
[Itemid] =>
)

After PR output:
JUri Object
(
[uri:protected] => index.php?option=com_users&view=profile
[scheme:protected] =>
[host:protected] =>
[port:protected] =>
[user:protected] =>
[pass:protected] =>
[path:protected] => /joomlacmsstaging/index.php/your-profile
[query:protected] =>
[fragment:protected] =>
[vars:protected] => Array
(
)

)

Array
(
[option] => com_users
[view] => profile
[id] => 1
[Itemid] => 102
[layout] => edit
)

Is it correct output as the PR? Let me know So I can give test vote for this PR.


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

avatar infograf768
infograf768 - comment - 30 Nov 2016

This lacks clear instructions.
Please explain in details what to do and what we get before and after patch.
Also it is anyway conflicting with present staging.

avatar RonakParmar
RonakParmar - comment - 25 Feb 2017

@alexva24 Any updates? Please provide Before and After patch code. so we can test it properly.


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

avatar RonakParmar
RonakParmar - comment - 27 Mar 2017

Any update?


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

avatar mbabker
mbabker - comment - 21 May 2017

Closing PR as abandoned due to lack of response from the submitter.

avatar mbabker mbabker - change - 21 May 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-05-21 22:07:12
Closed_By mbabker
avatar mbabker mbabker - close - 21 May 2017
avatar joomla-cms-bot joomla-cms-bot - change - 21 May 2017
Category ACL Router / SEF Front End com_users ACL Router / SEF

Add a Comment

Login with GitHub to post a comment