User tests: Successful: Unsuccessful:
Pull Request for Issue # .
This PR fixes wrong link to user profile when there is a menu item created to link to user profile menu option. When we call JRoute::_('index.php?option=com_users&view=profile') to get link to user profile, instead of getting /joomla/index.php/user-profile, we actual get /joomla/index.php/user-profile/profile (profile at the end is name of the view, it is not needed)
Create a menu item to link to user profile menu option of com_users, set alias to user-profile (you don't have to do that if you install Joomla with testing sample data)
Open the file templates/protostar/index.php, add the below command:
echo JRoute::_('index.php?option=com_users&view=profile');
Before patch, you will see URL like this /joomla/index.php/user-profile/profile (note profile at the end, it is not needed)
After patch, correct URL is displayed /joomla/index.php/user-profile (it is the URL of menu item you create to link to user profile)
URL without profile at the end when a menu item to link to user profile menu option is available
URL still has profile at the end.
Ping @csthomas to have a look as you have experience with Joomla routing
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_users |
This PR changes only the building process. Both links still work.
Cool, I didn’t have chance to check the code just thought it was worth mentioning whilst browsing on my phone.
On 20 Dec 2017, 23:20 +0000, Tomasz Narloch notifications@github.com, wrote:
This PR changes only the building process. Both links still work.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-10-03 01:30:46 |
Closed_By | ⇒ | joomdonation | |
Labels |
Added:
?
|
Does the previous link still work with this PR too? or at least 301 redirect to the new link?