joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.79k stars 3.66k forks source link

Upgrade 4.4 to 5 -> Fatal Error #42182

Closed barryRayPal closed 9 months ago

barryRayPal commented 1 year ago

Working Joomla 4.4 Installation Upgrade to 5.0

Expected Success

Compile Error: Declaration of Joomla\CMS\Log\DelegatingPsrLogger::log($level, Stringable|string $message, array $context = []): void must be compatible with PsrExt\Log\LoggerInterface::log($level, $message, array $context = [])

PHP 8.1

Where do I begin looking ?? I cannot see the paths Joomla\CMS\Log or PsrExt\Log anywhere on my server

richard67 commented 1 year ago

These are not filesystem paths but full qualified class names. To find out which extension it causes you can enable debug and set error reporting to maximum on the broken site (can be done by editing configuration.php).

conathan commented 1 year ago

Believe running into the same myself, using a tarball from https://downloads.joomla.org/cms/joomla5/5-0-0/Joomla_5.0.0-Stable-Full_Package.tar.gz?format=gz (Fresh Install).

#0 /misc/5/000/267/030/6/user/web/wordpress.ncoulson.com/joomla/libraries/bootstrap.php(57): Symfony\Component\ErrorHandler\ErrorHandler::register() 
#1 /misc/5/000/267/030/6/user/web/wordpress.ncoulson.com/joomla/installation/includes/framework.php(27): require_once('/misc/5/000/267...')
#2 /misc/5/000/267/030/6/user/web/wordpress.ncoulson.com/joomla/installation/includes/app.php(26): require_once('/misc/5/000/267...')
#3 /misc/5/000/267/030/6/user/web/wordpress.ncoulson.com/joomla/installation/index.php(32): require_once('/misc/5/000/267...')
#4 {main} thrown in /misc/5/000/267/030/6/user/web/wordpress.ncoulson.com/joomla/libraries/vendor/symfony/error-handler/ErrorHandler.php on line 112

Tested on 8.1/8.2 at bravenet.com (technically 8.0 as well, which gave the "you need 8.1 minimum"

Reran the same tests with Joomla 4.3.4, no issues


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

richard67 commented 1 year ago

@conathan How is your comment related to this issue? The issue is about Update and an error with logging, your comment is about new installation and a completely different log message.

richard67 commented 1 year ago

@barryRayPal Could you switch on debug and increase error reporting like I suggested in my first comment and report back the results, if possible with a screenshot or text copy of the stack trace if that is shown? It would help us to find out where the problem comes from. Thanks in advance.

conathan commented 1 year ago

Missed the beginning of it,

Fatal error: Uncaught Error: Class "Psr\Log\LogLevel" not found in /misc/5/000/267/030/6/user/web/wordpress.ncoulson.com/joomla/libraries/vendor/symfony/error-handler/ErrorHandler.php:112

and latched onto this ticket as it also referenced PsrLogger (I messed up).

I will open this up as a different ticket, apologies


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

richard67 commented 1 year ago

@conathan No problem. Thanks for reporting.

barryRayPal commented 1 year ago

Thanks for the tip. Traced file to libraries/src/Log/DelegatingPsrLogger.php Editted to comply & issue solved. - surely this file should have been part of 5.0 release ?

Anyway, now I can log in to backend BUT now issues with msqli calls eg /home/baup/j4/administrator/components/com_menus/src/Helper/MenusHelper.php (line 816) $results = $db->setQuery($query)->loadObjectList();

Did the update complete ?? Update progress seemed to get stuck at 80% then eventually reported errors . . . .

barryRayPal commented 1 year ago

Maybe I should restore to 4.4.0 and try again.

richard67 commented 1 year ago

Maybe I should restore to 4.4.0 and try again.

Maybe that’s the best. But when restoring the backup, use an empty database to restore the database, so you can be sure there are no remainders from the failed update.

You could check the update log administrator/logs/joomla_update.php before restoring. Maybe it shows where the error happened?

barryRayPal commented 1 year ago

log shows starting update to 5.0 but never finished !

Will reinstate and try again.

Thanks for your advice

Caprilli commented 1 year ago

Help please. I am totally lost on fixing this:

Deprecated : version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated in /home/customer/www/101.millviews.com/public_html/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php on line 1340

The update completed with errors. Please examine the update logs /home/u193-wkb1gt5zqiuu/www/101.millviews.com/public_html/logs/joomla_update.php for more details. It is recommended to restore the site from backup, fix the issues that caused the update failure and try to update again. You always can ask for help on Joomla! forum https://forum.joomla.org/

Script::preflight finished with "false" result.


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

richard67 commented 1 year ago

@Caprilli In your case the issue could be caused by the issue with the old Search component which you reported here: https://github.com/joomla-extensions/search/issues/28#issuecomment-1773695357 . I strongly recommend to switch to the advanced Smart Search component and uninstall the old search. For this it needs to uninstall the search PACKAGE, this will then uninstall all parts of it (component, modules, plugins).

barryRayPal commented 1 year ago

Maybe I should restore to 4.4.0 and try again.

This worked fine. Clearly the first update process never completed.

Thanks

Caprilli commented 1 year ago

@richard67 Thank you so much!!! I will remove the old search Package. My host (Siteground) also has an older version of mysql, so 4.4 and 5 are not yet an option. I thought about changing my provider but siteground has been great in saving my websites, when I failed over the years, so I have decided to just wait until they update the db version.

richard67 commented 1 year ago

@Caprilli 4.4 still runs with MySQL 5.7, only 5 requires 8.0.13.

Caprilli commented 1 year ago

@richard67 that is what I read too but then I get a message before updating the the db table structure is not up to date, so I kept to 4.3.

richard67 commented 1 year ago

@richard67 that is what I read too but then I get a message before updating the the db table structure is not up to date, so I kept to 4.3.

If you hover the badge with problems in the database checker you should see the details. What does it show? Does the "Fix structure" button help? It needs to select the entry for the CMS in the database errors with the check box before using that button, so the button knows what to fix.

Caprilli commented 1 year ago

@richard67 sadly it makes no difference, even if I update the db structure. In Installations without SP Page Builder, there is not even anything to update and I still get that warning. Sadly, I cannot find the search package either? In which folder should I be able to find it?

Hackwar commented 9 months ago

The original issue was solved, so I'm closing this one.