D/B warning error after update to J4 Topic is solved

Need help upgrading your Joomla! website or converting to Joomla! 4.x?

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
sclg
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Mon Nov 06, 2006 7:46 pm
Location: Gloucestershire, UK

D/B warning error after update to J4

Post by sclg » Mon Mar 20, 2023 2:00 pm

I've updated a site to J4.
No errors flagged during the update. All extensions, templates, etc updated to J4 compliant versions.
Cleared out any 'leftover' tables and folders from old extensions, etc.
Everything in the front end works fine.
The only problem is that Maintenance:Database shows 2 warning errors...

Code: Select all

Warning: Attempt to read property "schemapath" on null in D:\wwwroot\pensions\administrator\components\com_installer\src\Model\DatabaseModel.php on line 180
and

Code: Select all

Warning: Trying to access array offset on value of type null in D:\wwwroot\pensions\administrator\components\com_installer\src\Model\DatabaseModel.php on line 180
Tried turning on the various debug options but I don't get any more information.
Any thoughts on what might cause this please?
I can post the FPA output if required.

Thanks

sclg
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Mon Nov 06, 2006 7:46 pm
Location: Gloucestershire, UK

Re: Error after J4 upgrade : Attempt to read property "schemapath"

Post by sclg » Wed Mar 22, 2023 4:09 pm

I know it is no help but I have exactly the same problem and have had no responses to my requests for ideas either.
I also tried removing all extensions and it didn't cure it.
Last edited by toivo on Tue Mar 28, 2023 5:10 am, edited 1 time in total.
Reason: mod note: merged cross post with current topic - please do not cross post in the future!

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2677
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Error after J4 upgrade : Attempt to read property "schemapath"

Post by ceford » Wed Mar 22, 2023 6:37 pm

Reading the code, it seems the installer is looking for the sql/updates folder of each extension and runs into trouble if a folder is not found and a schema is not found in the component installation data.

You could try planting this code in line 178 of administrator/components/com_installer/src/Model/DatabaseModel.php

file_put_contents(JPATH_ADMINISTRATOR . '/logs/log_test.log', $folderTmp . "\n", FILE_APPEND);

Then reload the Maintenance: Database page and immediately open administrator/logs/log_test.log with a text editor. You should see the path to the missing folder and that should tell us which extension is causing the problem.

Do not forget to remove the planted line immediately after the test!

sclg
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Mon Nov 06, 2006 7:46 pm
Location: Gloucestershire, UK

Re: Error after J4 upgrade : Attempt to read property "schemapath"

Post by sclg » Thu Mar 23, 2023 9:18 am

ceford wrote:
Wed Mar 22, 2023 6:37 pm
Reading the code, it seems the installer is looking for the sql/updates folder of each extension and runs into trouble if a folder is not found and a schema is not found in the component installation data.

You could try planting this code in line 178 of administrator/components/com_installer/src/Model/DatabaseModel.php

file_put_contents(JPATH_ADMINISTRATOR . '/logs/log_test.log', $folderTmp . "\n", FILE_APPEND);

Then reload the Maintenance: Database page and immediately open administrator/logs/log_test.log with a text editor. You should see the path to the missing folder and that should tell us which extension is causing the problem.

Do not forget to remove the planted line immediately after the test!
You are a genius!
Now I know it's the Cookie Policy Notification extension and can follow up on that and try uninstalling/reinstalling.
Many thanks


Locked

Return to “Migrating and Upgrading to Joomla! 4.x”