Skip to content

Conversation

@SniperSister
Copy link
Contributor

@SniperSister SniperSister commented Jan 27, 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

@richard67 richard67 added the bug label Jan 27, 2025
@richard67
Copy link
Member

richard67 commented Jan 27, 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.

@pe7er pe7er self-assigned this Jan 30, 2025
@WM-Loose
Copy link

WM-Loose commented Jan 31, 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.

@richard67
Copy link
Member

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

@WM-Loose
Copy link

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

@richard67
Copy link
Member

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

@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jan 31, 2025
@Hackwar Hackwar merged commit e18bfd2 into joomla:5.2-dev Jan 31, 2025
3 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jan 31, 2025
@Hackwar Hackwar added this to the Joomla! 5.2.4 milestone Jan 31, 2025
@Hackwar
Copy link
Member

Hackwar commented Jan 31, 2025

Thank you for your contribution! 😀

@wilsonge
Copy link
Contributor

wilsonge commented Feb 2, 2025

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

@tooliedotter
Copy link

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.

@ghost
Copy link

ghost commented Feb 3, 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

@SniperSister
Copy link
Contributor Author

@wilsonge done, see #44811

@tooliedotter
Copy link

tooliedotter commented Feb 3, 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.

@laoneo
Copy link
Member

laoneo commented Feb 3, 2025

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

@Hackwar
Copy link
Member

Hackwar commented Feb 3, 2025

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

@tooliedotter
Copy link

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.

@richard67
Copy link
Member

@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

@tooliedotter
Copy link

@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?

@richard67
Copy link
Member

@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.

@richard67
Copy link
Member

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.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants