RTC bug PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar SniperSister
SniperSister
27 Jan 2025

Summary of Changes

The creation of the namespace map file fails on PHP 8.4 as the content is implicitly provided to File::write as reference, causing this message:

Joomla\Filesystem \File: write: Argument #2 ($buffer) could not be passed by reference

Testing Instructions

  • Enable PHP 8.4
  • Remove the namespace map file autoload_psr4.php in the cache folder
  • Refresh the backend

Actual result BEFORE applying this Pull Request

  • Error message shown

Expected result AFTER applying this Pull Request

  • File created

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar SniperSister SniperSister - open - 27 Jan 2025
avatar SniperSister SniperSister - change - 27 Jan 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jan 2025
Category Libraries
avatar SniperSister SniperSister - change - 27 Jan 2025
The description was changed
avatar SniperSister SniperSister - edited - 27 Jan 2025
avatar richard67 richard67 - test_item - 27 Jan 2025 - Tested successfully
avatar richard67
richard67 - comment - 27 Jan 2025

I have tested this item ✅ successfully on 7d5943a

Hint for other testers: It needs to set PHP error_reporting to maximum and to enable "Debug System" (or have display_errors = On in PHP settings) for reproducing the error.


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

avatar WM-Loose WM-Loose - test_item - 31 Jan 2025 - Not tested
avatar WM-Loose
WM-Loose - comment - 31 Jan 2025

I have tested this item succesfully.

Tested with php8.4. After implementing the changes specified in the patch, the error no longer exists.
Thanks to SniperSister.

Regrards,
Dirk


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

avatar richard67
richard67 - comment - 31 Jan 2025

@WM-Loose It seems you have not selected the test result before submitting, so you have submitted "Not tested".

avatar WM-Loose
WM-Loose - comment - 31 Jan 2025

Yes, I forgot to click.
Sorry, but I don't do that very often.

avatar richard67
richard67 - comment - 31 Jan 2025

@WM-Loose Ok, I will mark the test result for you.

avatar richard67 richard67 - alter_testresult - 31 Jan 2025 - @WM-Loose: Tested successfully
avatar richard67 richard67 - change - 31 Jan 2025
Status Pending Ready to Commit
Labels Added: bug PR-5.2-dev
avatar richard67
richard67 - comment - 31 Jan 2025

RTC


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

avatar Hackwar Hackwar - change - 31 Jan 2025
Labels Added: RTC
avatar Hackwar Hackwar - close - 31 Jan 2025
avatar Hackwar Hackwar - merge - 31 Jan 2025
avatar Hackwar Hackwar - change - 31 Jan 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-01-31 17:14:06
Closed_By Hackwar
avatar Hackwar
Hackwar - comment - 31 Jan 2025

Thank you for your contribution! 😀

avatar wilsonge
wilsonge - comment - 2 Feb 2025

If this blocks the creation of the file totally then this needs backporting to the 4.x branch

avatar tooliedotter
tooliedotter - comment - 3 Feb 2025

When will this fix be available in Joomla public distributions? I have a server with PHP 8.4 and a mixture of Joomla 4 and Joomla 5 websites whose extensions I cannot update at all. Some are flat-out broken where the Admin side works but the front-end does not.

Thoughts?


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

avatar fgsw
fgsw - comment - 3 Feb 2025

When will this fix be available in Joomla public distributions?

@tooliedotter

Milestone is 5.2.4 (Github)

1

Click on 5.2.4 shows planned Release date 18 February 2025

2

avatar SniperSister
SniperSister - comment - 3 Feb 2025

@wilsonge done, see #44811

avatar tooliedotter
tooliedotter - comment - 3 Feb 2025

Here's hoping you finish sooner. I'm going to have to recreate my 10 Joomla 4 sites in Joomla 5 and hobble along with my Joomla 5 sites until then. I tell you this in case for any reason the Joomla developers forget that what you do impacts people's businesses big-time. Thank you.

avatar laoneo
laoneo - comment - 3 Feb 2025

In emergency you can always apply the code change manually, especially this one as it is small.

avatar Hackwar
Hackwar - comment - 3 Feb 2025

The date is fixed. We will not release earlier than that. If you need this fix now, you have to apply it manually.

avatar tooliedotter
tooliedotter - comment - 3 Feb 2025

I am open to applying it manually. I do not dabble in the Joomla GitHub project; if there's a specific file to download and replace, I'd appreciate it if you'd point that out to me. Thank you.

avatar richard67
richard67 - comment - 3 Feb 2025

@tooliedotter You can go to "Changed files" in this pull request and see there is only one file and then download that file.

For your convenience: libraries/namespacemap.php

avatar tooliedotter
tooliedotter - comment - 3 Feb 2025

@richard67 you are a gentleman and I thank you very much. I've got the file; the question is, will it only work on Joomla 5 or can I apply this to my broken Joomla 4 sites?

avatar richard67
richard67 - comment - 3 Feb 2025

@tooliedotter For Joomla 4 you have to use the file from the PR #44811 for Joomla 4: libraries/namespacemap.php

But you should not apply the files on any Joomla 4 and 5 version, it should be the latest version, i.e. 4.4.10 for the J4 file and 5.2.3 for the J5 file.

avatar richard67
richard67 - comment - 3 Feb 2025

P.S.: It also can be that the 2 files are identical, I haven't checked that. But better play safe and use the right one.

Add a Comment

Login with GitHub to post a comment