Skip to content

Fix JUri::root() assignment from backend app constuctor#8587

Merged
roland-d merged 2 commits intojoomla:stagingfrom
izharaazmi:patch-5
Jun 25, 2016
Merged

Fix JUri::root() assignment from backend app constuctor#8587
roland-d merged 2 commits intojoomla:stagingfrom
izharaazmi:patch-5

Conversation

@izharaazmi
Copy link
Copy Markdown
Contributor

@izharaazmi izharaazmi commented Dec 3, 2015

This may not seem any important but I'd say it still is breaking. Try running Joomla in a subdirectory administrator under your web root, and open backend. It would break.

example.com/administrator/administrator/index.php

dirname will work on all platforms as JUri::base(true) always uses / as the path separator. Also there is no trailing slash in the return value of JUri::base(true)

This may not seem any important but I'd say it still is breaking. Try running Joomla in a subdirectory `administrator` under your web root, and open backend. It would break.
@brianteeman
Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully on fb59736


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

Removed trailing slash, which eventually only occurs when queried for a root domain Joomla setup, i.e. not in a subdirectory installation.
@joomla-cms-bot
Copy link
Copy Markdown

This PR has received new commits.

CC: @brianteeman


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

@pe7er
Copy link
Copy Markdown
Contributor

pe7er commented Jun 25, 2016

I have tested this item ✅ successfully on 9250008

Patch tested successfully on Joomla! 3.6.0-beta2

I've installed Joomla in a folder called /administrator/ and going to the /administrator/administrator/ results in a blank page.

I've manually added the code of this patch to the file, and it solves the problem.

Thanks!


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

@BezouwenR
Copy link
Copy Markdown

I have tested this item ✅ successfully on 9250008

Patch tested successfully on Joomla! 3.6.0-beta2

I've installed Joomla in a folder called /administrator/ and going to the /administrator/administrator/ results in a blank page.

I've manually added the code of this patch to the file, and it solves the problem.

// JUri::root(null, str_ireplace('/' . $this->getName(), '', JUri::base(true)));
JUri::root(null, rtrim(dirname(JUri::base(true)), '/'));

Thanks!


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

@ggppdk
Copy link
Copy Markdown
Contributor

ggppdk commented Jun 25, 2016

I have tested this item ✅ successfully on 9250008

Also works for placing joomla in sub-folder like
/administrator*/

e.g.
/administrator_2/


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

@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented Jun 25, 2016

RTC based on testing


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jun 25, 2016
@roland-d roland-d added this to the Joomla 3.6.0 milestone Jun 25, 2016
@roland-d roland-d merged commit cb68988 into joomla:staging Jun 25, 2016
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jun 25, 2016
@roland-d
Copy link
Copy Markdown
Contributor

Thanks everybody

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants