Skip to content

Conversation

@HLeithner
Copy link
Member

Pull Request for Issue #37909 .

Summary of Changes

Instead of checking if a file has not been deleted form the installation folder, move the expected file to the tmp folder and delete it after the move. This allows to delete the complete installation folder. because the lock is no longer on a file in the installation folder. Instead the lock is in the tmp folder which we don't delete. The lock on the moved file will be freed after the the php process finishes and windows finally deleted the move file.

Testing Instructions

Install joomla on windows with xampp or any other windows php server.

Actual result BEFORE applying this Pull Request

  • After installation the /installation folder is empty but still exists

Expected result AFTER applying this Pull Request

  • After installation the /installation folder doesn't exists

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

@brianteeman
Copy link
Contributor

I have tested this item 🔴 unsuccessfully on 18f2fc5


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

@brianteeman
Copy link
Contributor

As expected
image

The empty folder is still present

@HLeithner
Copy link
Member Author

@brianteeman I didn't expected this because I tested it... which setup? with xampp or another windows server setup?

@HLeithner
Copy link
Member Author

maybe it's the developer version which doesn't delete the folder and does something different, could you try to use only the patch on a 5.4 version?

@brianteeman
Copy link
Contributor

using laragon 8.3 with php 8.5
I tested using a complete new install using the full package https://artifacts.joomla.org/drone/joomla/joomla-cms/5.4-dev/46584/downloads/90006/Joomla_5.4.2-dev+pr.46584-Development-Full_Package.zip

I wrote as expected because the explanation @richard67 wrote earlier is not changed by this pr

@joomdonation
Copy link
Contributor

joomdonation commented Dec 18, 2025

Just tested and it worked OK for me. I downloaded Joomla 5.4.1, then patched the file manually before running installation process. The installation folder was completely deleted. I'm using Xampp

@brianteeman
Copy link
Contributor

tested again with a download of the released j.5.4.1 where i replaced the changed file with the file in this PR

exactly the same

@HLeithner
Copy link
Member Author

thanks, I will test it with laragon

@HLeithner
Copy link
Member Author

j4i with xampp it works also with this pre-built package and php 8.2 by pressing the delete installation button.

@brianteeman
Copy link
Contributor

PS from my perspective it's a very low level issue

@HLeithner
Copy link
Member Author

While looking at the code I found the comment where it actually says it's expected behavior and I don't know way the issue wasn't closed... but since I had a working solution for me I continued with the pr...

@HLeithner
Copy link
Member Author

Don't know whats different in your setup, but I installed Laragon 8.4.0 on a new windows 11 with php 8.3, extracted joomla from this pr and was able to remove the installation folder as expected...

@chmst
Copy link
Contributor

chmst commented Dec 18, 2025

I have not tested this item.

Tested on win11 with laragon - successfully. The install folder is removed, no error, no warning.


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

@brianteeman
Copy link
Contributor

no idea why it doesnt work for me - but if it works for others then great

@chmst
Copy link
Contributor

chmst commented Dec 18, 2025

I have tested this item ✅ successfully on 18f2fc5


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

@chmst
Copy link
Contributor

chmst commented Dec 18, 2025

No idea. I did not expect that it works, because in former installations I had another error message tha @brianteeman and thought, it is laragon stuff+´

@HLeithner
Copy link
Member Author

I decided to add back the old workaround, better safe than sorry. @brianteeman can you test again that at least the old workaround works for you.

@richard67
Copy link
Member

richard67 commented Dec 18, 2025

@joomdonation @chmst Have you also tested that it fails on your environment without the PR applied? Fails means there is an empty "installation" folder after the installation. And you should test with a stable version so the "installation" folder would be deleted automatically in any case, not having the choice with the button like you have it in a development environment or a development version (nightly build, PR package or any pre-release).

@ot2sen
Copy link
Contributor

ot2sen commented Dec 18, 2025

A fresh check using wampserver 64 with joomla 5.4.1 stable didn´t meet the BEFORE issue. The /installation folder is actually deleted here in this setup without aplying any fix.

@joomdonation
Copy link
Contributor

In my case, before this PR, I still have an empty installation folder left. After this PR, the installation completely deleted, so it worked for me. I'm using xampp, but PHP 8.4 downloaded and configured separately, not coming from xampp.

@richard67 richard67 added the bug label Dec 19, 2025
@richard67
Copy link
Member

@joomdonation I just see you haven't marked a test result in the issue tracker?

@brianteeman @chmst Could you test again with the latest changes. Thanks in advance.

@joomdonation
Copy link
Contributor

@joomdonation I just see you haven't marked a test result in the issue tracker?

This is a very low priority issue and the current status is acceptable (with empty installation folder). So I will wait for Brian test to see if he still see error with the latest change. If there is no error anymore, I will report my test result. If there is still error, maybe there is still some conditions cause errors which we don't know and in that case, better we leave it as how it is.

@brianteeman
Copy link
Contributor

brianteeman commented Dec 19, 2025

retested with the latest changes using the full download from this PR with laragon 8.4 and php 8,.4.8 and the behaviour is the same - i still have the empty installation folder

(I deleted a previous comment as that was my error)

@chmst
Copy link
Contributor

chmst commented Dec 19, 2025

Re-tested successfully. On laragon, win11, php 8.3.16

in a completely new directory used the download package Joomla_5.4.1-Stable-Full_Package.zip
It worked without error message. BUT The installationfolder is still here and it is empty.

Then tested with Joomla_5.4.2-dev+pr.46584-Development-Full_Package.zip
Here the development mode is recognised, the button for "remove installation folder" appears. Klick on the button removes the folder completely.

@HLeithner
Copy link
Member Author

Since the old workaround is still in place and it works a bit better for some people then before I would say it's acceptable to merge this till someone want's to invest more time to solve windows problems.

@richard67
Copy link
Member

Since the old workaround is still in place and it works a bit better for some people then before I would say it's acceptable to merge this till someone want's to invest more time to solve windows problems.

@HLeithner It might come too late for 5.4.2 and 6.0.2 as we are already preparing the stable packages today. So it might be 5.4.3 and 6.0.3 (and 6.1.0-beta1) in February where we can get it in. I will see if I can reactivate my Windows environment where I could reproduce the issue and if so I can also test it.

@HLeithner
Copy link
Member Author

It's not urgent at all, so 5.4.3 is of course fine.

@richard67
Copy link
Member

richard67 commented Dec 21, 2025

I have tested this item ✅ successfully on c668b71

I was able to reproduce the issue and verify that the fix from this PR works for me.

Without the fix, an empty installation folder is remaining after an installation of a 5.4 stable and using one of the buttons to go to site or administrator.

With the fix the installation folder is completely removed.

In both cases the installation has been made in a subfolder of the webserver's document root, i.e. site URL is https://localhost/joomla54/.

Environment:

  • Windows 10 Pro 22H2
  • XAMPP 8.2.12
  • Apache 2.4.58
  • PHP 8.2.12 (VS16 X86 64bit thread safe) + PEAR
    (Apache and PHP as shipped with that XAMPP version).

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

@ThomasFinnern
Copy link
Contributor

I tried to test this PR on Windows 11, WAMP server 3,3,7, PHP 8.3.19, Apache 2.4.62
On nightly build full package Joomla! 5.4.2-rc2-dev the installation folder was already deleted. I tested also the PR full package and the folder was deleted too.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants