RTC bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
15 Oct 2025

Pull Request for Issue #46284.

Summary of Changes

At the end of the installation process, Joomla attempts to delete the installation folder.
On Windows, this operation consistently throws a FilesystemException because PHP locks the currently executing index.php file, preventing its immediate removal.

The exception was not caught, causing a fatal error and breaking the cleanup process.

This PR fixes the issue by wrapping the folder deletion in a try/catch block and returning false when an exception is thrown, instead of letting it crash.

Additionally, a Windows-specific workaround has been added:
if the installation folder contains no subfolders and only the (already deleted but still locked) index.php file, we can assume the deletion was effectively successful and continues the cleanup process.

Testing Instructions

  • You can only see the issue and test this PR on Windows
  • Follow instructions at #46284, confirm the issue
  • You cannot test this using Patch Tester, unfortunately. You can test it by download Joomla 5.4 from https://downloads.joomla.org/cms/joomla5/, then replace the file installation/src/Model/CleanupModel.php with the modified file in this PR, then run the installation and make sure the error is gone.

Actual result BEFORE applying this Pull Request

  • Error while installing Joomla on Windows

Expected result AFTER applying this Pull Request

  • The error is fixed

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

PS: I used ChatGTP to improve the PR description and code comment to make it more clear :D. It provides better, clear messages than mine :D

avatar joomdonation joomdonation - open - 15 Oct 2025
avatar joomdonation joomdonation - change - 15 Oct 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Oct 2025
Category Installation
dde7e41 15 Oct 2025 avatar joomdonation CS
avatar joomdonation joomdonation - change - 15 Oct 2025
Labels Added: PR-5.4-dev
avatar joomdonation joomdonation - change - 15 Oct 2025
The description was changed
avatar joomdonation joomdonation - edited - 15 Oct 2025
avatar brianteeman
brianteeman - comment - 15 Oct 2025

You cant test this properly with the download in this pr as that still has the dev_status=development and that needs to be manually changed before trying to install

avatar brianteeman brianteeman - test_item - 15 Oct 2025 - Tested successfully
avatar brianteeman
brianteeman - comment - 15 Oct 2025

I have tested this item ✅ successfully on 77e58b5


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

avatar joomdonation
joomdonation - comment - 15 Oct 2025

Or get a fresh installation of Joomla 5.4, then replace the file installation/src/Model/CleanupModel.php in the package with the file change in this PR as I wrote in testing instructions. I do not know if there is an easier way to test this.

avatar richard67 richard67 - test_item - 18 Oct 2025 - Tested successfully
avatar richard67
richard67 - comment - 18 Oct 2025

I have tested this item ✅ successfully on 77e58b5

Had to setup XAMPP on Windows to be able to reproduce the issue as it doesn't happen with Linux.


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

avatar richard67 richard67 - change - 18 Oct 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 18 Oct 2025

RTC


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

avatar richard67 richard67 - change - 18 Oct 2025
Labels Added: RTC bug
avatar muhme
muhme - comment - 19 Oct 2025

✅ Final test before merge with localhost Joomla installation on Windows 11-Pro, Laragon 6.0

  • Installed from nigthly full package, Disabled Automated Updates
  • Tried to delete installation folder getting error
    Beim Abrufen von JSON-Daten wurde ein HTTP-Statuscode 500 zurückgegeben. Internal Server Error
    and folder installation is not deleted
  • 2nd installation from PRs full package is working without any errors and the installation folder is emptied
avatar muhme muhme - change - 19 Oct 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-10-19 08:31:09
Closed_By muhme
avatar muhme muhme - close - 19 Oct 2025
avatar muhme muhme - merge - 19 Oct 2025
avatar muhme
muhme - comment - 19 Oct 2025

Thank you @joomdonation for your contribution. Thank you @richard67 and @brianteeman for your support and testing.

avatar joomdonation
joomdonation - comment - 19 Oct 2025

Thanks, everyone !

Add a Comment

Login with GitHub to post a comment