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.

Add a Comment

Login with GitHub to post a comment