? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
3 May 2021

Summary of Changes

History: #33263

Allow in-memory autoload_psr4.php on REALLY strange servers (I.e. A server that cannot write to the folder /administrator/cache) so that Joomla can (albeit worse performance) run so that it can show more sensible errors on installation (Was originally designed for servers needing the FTP Layer, but as a decision to remove that layer has now been made, a further decision was made to keep the cached namespacemap so that Joomla could still load enough to show error messages (or even work fully) if the namespacemap cannot be written to /administrator/cache

I dont expect this code to ever be used on a site, however, as its already merged, I should address the fact that it may be used by 1 person in the next 20 years.

This PR improves (fixes) the currently merged code, to allow the above to happen on servers with [spaces, periods, single quotes] in their JPATH_BASE folder structures, and with /administrator/cache unwritable - this is the only change here.

Testing Instructions

make yourself a folder with [spaces, periods] in it. I would go with something like

My Folder.Old Stuff

Use the above folder as your Joomla folder.
git checkout 4.0-dev
rm administrator/cache/autoload_psr4.php
chmod 000 administrator/cache
Load Joomla Installation (or site/admin if you already had Joomla installed)
See error
chmod 777 administrator/cache (to allow you to apply PR with git if needed)
Apply PR
rm administrator/cache/autoload_psr4.php (if exists, should not)
chmod 000 administrator/cache
Load Joomla - it works!

Actual result BEFORE applying this Pull Request

With the already merged PR #33263 it "does not work in its current state", you could only use the cached namespacemap on folder structures that did not contain [spaces, periods, single quotes] in their folder structures (So a site in "My Sites.guru" folder would error).

This effects approx 0.0000297% of sites following my research of the absolute path of 67,348 sites, even though those sites can actually write to the /administrator/cache and therefore would not actually use the cached namespacemap.

Expected result AFTER applying this Pull Request

You can now expect the namespacemap to be generated on each page load, when it is unable to save /administrator/cache/namespacemap.php due to file/folder permissions.

Joomla can be installed and works perfectly without a physical file at /administrator/cache/namespacemap.php

Documentation Changes Required

none.

// @wilsonge @SharkyKZ

avatar PhilETaylor PhilETaylor - open - 3 May 2021
avatar PhilETaylor PhilETaylor - change - 3 May 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 May 2021
Category Libraries
avatar PhilETaylor PhilETaylor - change - 3 May 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 3 May 2021
avatar PhilETaylor PhilETaylor - change - 3 May 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 3 May 2021
avatar PhilETaylor PhilETaylor - change - 3 May 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 3 May 2021
avatar PhilETaylor PhilETaylor - change - 3 May 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 3 May 2021
avatar PhilETaylor
PhilETaylor - comment - 3 May 2021

@richard67 Looks like drone is broken again, not the fault of this PR.

avatar PhilETaylor PhilETaylor - change - 3 May 2021
Title
Allow cached namespacemap on folder structures not normally seen
[4] Allow cached namespacemap on folder structures not normally seen
avatar PhilETaylor PhilETaylor - edited - 3 May 2021
avatar wilsonge wilsonge - change - 5 Jul 2021
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-07-05 15:26:45
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 5 Jul 2021
avatar wilsonge wilsonge - merge - 5 Jul 2021
avatar wilsonge
wilsonge - comment - 5 Jul 2021

What's the worst that can happen :D

Thankyou!

Add a Comment

Login with GitHub to post a comment