While working with the support team at LiquidWeb regarding a CLI scripting issue from SSH, they reported back the following information from the log files that I believe relates specifically to the Joomla framework and not one of my 3rd party extensions. I just wanted to provide this information to the Joomla Dev team.
"PHP Deprecated: Bootstrapping Joomla using the /var/www/vhosts/domain.org/libraries/import.legacy.php file is deprecated. Use /var/www/vhosts/domain.org/libraries/bootstrap.php instead. in /var/www/vhosts/domain.org/libraries/import.legacy.php on line 17, referer: https://domain.org/installation/index.php?view=finalise"
Just an FYI of a possible bug for a future release fix.
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Information Required
|
I'm running the most current version v4.3.4 using PHP v8.1.22. I actually didn't get the error at all during installation, tho perhaps it might have been displayed in the console of dev tools in Chrome. To be fair, it doesn't appear to be having any issues with regards to installation or web usability. It was just a message on my server's log files that I thought I'd share with the dev team.
What happened was I was trying to run the smart search indexer from SSH using the following:
/opt/plesk/php/8.1/bin/php /var/www/vhosts/domain.org/cli/joomla.php finder:index --verbose
and it was just hanging after the second batch for like 15 minutes until I forced it to cancel. Even with verbose enabled I couldn't get any details on what was causing the issue so I got on a chat with LiquidWeb's support and they were digging through the logs to see if there was any information there. It did eventually run and complete and we chalked it up to a possible server hiccup – I was able to run it a few more times from SSH and it completed without any issues. However, while they were checking the log files they did see that PHP deprecated warning and I just wanted to let the dev team know about it. I wouldn't know how to reproduce it tho.
Perhaps it's nothing. Again, it certainly doesn't seem to be affecting any of my installations or operations of my sites. But how I read it seemed to imply some deprecated code in the installer that might need to be looked into. Just trying to do my part :)
Normally on a Joomla site, the installation folder is deleted after installation, so that folder should not be present on your site.
The installation folder itself isn't there - it was properly removed after the initial setup. However the file referenced isn't in that directory, it's in the libraries folder: "/libraries/import.legacy.php".
Labels |
Removed:
Information Required
|
Maybe the log was old? Or was a custom installer used and not the core one?
When looking at our installation/index.php
file, it calls the installation/includes/app.php
:
https://github.com/joomla/joomla-cms/blob/4.3-dev/installation/index.php#L36
This then calls the installation/includes/framework.php
:
https://github.com/joomla/joomla-cms/blob/4.3-dev/installation/includes/app.php#L26
And this finally calls the libraries/bootstrap.php
:
https://github.com/joomla/joomla-cms/blob/4.3-dev/installation/includes/framework.php#L27
So Joomla 4 does already the recommended Use /var/www/vhosts/domain.org/libraries/bootstrap.php instead
thing.
Was the log maybe from installing a Joomla 3.10? This still uses the old, deprecated way whcih causes that deprecation message:
https://github.com/joomla/joomla-cms/blob/3.10-dev/installation/application/framework.php#L36
It was a fresh install of J4, not an upgrade from J3, however I believe I did do a restore from an Akeeba backup previously so maybe that was something. To be clear, even the Akeeba backup was restoring an original J4 install, nothing ever upgraded from the J3 series, but that's the only other thing that I can imagine that would be different from the default J4 installer scripts.
I've got around 20 different J4 sites on this server, all of them freshly rebuilt in J4, and all of them do have the "/libraries/import.legacy.php" file which was the file referenced in the log. Now what would be calling that specific file, or why, is way out of my wheelhouse unfortunately so I'll have to leave the heavy lifting to someone else more qualified. In my limited knowledge, I don't know why a clean J4 install would ever be calling the "import.legacy" file, but maybe there's an errant call somewhere.
If there's anything else I can do on my end to help please let me know though. I'm happy to help where I can.
@richard67 view=finalise means it was not a j3 install
as the installer no longer references that file I am closing this
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-08-31 10:36:22 |
Closed_By | ⇒ | brianteeman |
@pscarnegie When do you get that error and with which version of Joomla? I assume it happens when installing Joomla, as the referrer is the "installation/indeex.php", but that's just my assumption. Would be good if you could provide these details.