Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Joomla hates root jail: errors when JPATH_ROOT is / #30756

Open
bato3 opened this issue Sep 24, 2020 · 8 comments
Open

[4.0] Joomla hates root jail: errors when JPATH_ROOT is / #30756

bato3 opened this issue Sep 24, 2020 · 8 comments

Comments

@bato3
Copy link

bato3 commented Sep 24, 2020

Steps to reproduce the issue

In some web-server configuration, when JPATH_ROOT is / Joomla don't work correctly:

  1. replaces slashes in web assets: HTMLHelper::convertToRelativePath()
  2. when is configured without mod_rewrite work only for main page, others render as 404

Expected result

<link href="/media/vendor/fontawesome-free/css/fontawesome.min.css?5.14.0" rel="stylesheet" />
  1. index.php?option=com_content&view=article&layout=edit&id=841 -> http status 200

Actual result

<link href="/mediavendorfontawesome-freecssfontawesome.min.css?5.14.0" rel="stylesheet" />
  1. /index.php?option=com_content&view=article&id=841 -> http status 404
    /841-article-title -> https status 200

System information (as much as possible)

Shared web hosting, with domain connected to directory "with site separation".

(Provider: home.pl is one of the largest service providers in Poland.)

Additional comments

I had no problem with reconfiguration the server, but it took me a long time to find the problem. (And a lot of stress)

If this problem cannot be quickly dealt (HTTP 404), I suggest add warning to installator, admin and site .

if(JPATH_ROOT == '/installation' || JPATH_ROOT == '/administrator' || JPATH_ROOT == '/')
@SharkyKZ
Copy link
Contributor

Can you check if PR #23149 fixes the issue?

@bato3
Copy link
Author

bato3 commented Sep 24, 2020

This change JPATH_ROOT don't work:

define('JPATH_ROOT', JPATH_BASE === DIRECTORY_SEPARATOR?'':implode(DIRECTORY_SEPARATOR, $parts));

The test could show false results, I am not able to check it closely. I only have the live version.

If this help: Joomla 3.6 works on this configuration, but i can't update it to 3.9.

@SharkyKZ
Copy link
Contributor

That's not the change in #23149.

@richard67
Copy link
Member

@bato3 Please test the complete change from #23149 on 3.9, not only that one line. Could you do that? Thanks in advance.

@bato3
Copy link
Author

bato3 commented Oct 1, 2020

@richard67 I have this issue for Joomla 4.0.

I have no way to test for v.3.9

@N6REJ
Copy link
Contributor

N6REJ commented Oct 1, 2020

@bato3 why can't you test on 3.9?

@bato3
Copy link
Author

bato3 commented Oct 2, 2020

@N6REJ Because I only have one available place where I can check it and it's occupied by Joomla 4.0. And it's a live version.

You know it: All developers have test environments and some even have production environments.
My provider is an asshole. Doing something non-standard there is a pain. (but gives a lot of space for mail).

@N6REJ
Copy link
Contributor

N6REJ commented Oct 5, 2020

using 4.0 for a production site is not a wise move imo.

@Hackwar Hackwar added the bug label Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants