Hi,
Thank you very much, I tried that and it seems I was a bit hasty in my assessment.
There are two problems:
First, after using it like this I got an error message (from update.php I think) that 'stable' was installed but is not included in drupal 10.
To get rid of that one would need to uninstall the (unfortunately hidden core-) stable while still in Drupal9 but after installing Classy. So thats not an easy solution.
Second, on closer inspection I noticed that stable9 is not exactly identical to the old stable. I didn't see any differencesin they layout but in that light I guess one could only recommend using 'at own risk'.
So what I finally did was to also install the contributes stable theme.
Probably that was the intended way to go in the first place. I did however not see any advice to do so.
If I didn't just overlook it could you please think of adding that?
(PS: I'm not sure if composer simply knows about that dependency, since I'm not able to use that)
bernd31 → created an issue.
Hi,
As one of the few remaining users who can't use composer, I was somewhat interested in getting this fixed.
So if I gave you a working solution, would anybody be willing to implement it?
What I did was (in FileTransfer.php)
- Kept the added property declarations but renamed connection back (removed -Handle) and made it public
- Added code to make sure chrootHandle is always set when needed (that part broke with the addition of the declaration) and fixed some leftover uses of just chroot (without 'Path')
Im adding adding this as a .zip file, I know that's not the right way but learning how to create a merge request seems like a lot of work...
Btw, I tested this on a site with shared hosting with a chrroted FTP. I also verified that the 'Local' subclass still works.
Some more Details on what I dit, and why:
The change made with Drupal 9.5 was to add property declarations for $connection, $croot and $jail.
connection and chroot were also renamed and made private respectively protected.
Some more 'magic' were function added, probably to make it (unit tests?) work again.
Renaming connection was imho ill-advised. Because that means the __get() has two different things to do: providing access from the outside and the FTPExension subclass, and connecting when $connection is absent in the class itself.That just leads to unnecessary complications.
By the way, connection is deliberatley unset in core\modules\update\update.authorize.inc
See "unset($filetransfer->connection);" (with an explanation added)
So what happens is: From the form where the ftp credentials are entered, a connection is established, but probably just to test it.
When we come back wih a task, connection is therefore completely gone. Also, chrootPath has somehow lost it's value.
But because it is declared, it is null, not absent. So while connection reestablishes itself, the 'magic' __get is nottriggered by it. Apparently, null is not unaccessible for the sake of this.
So I had to find a location where to call setChroot() and found it in fixRemotePath().
After that, all the other magic functions were no longer needed.