Upgrade from 2.8.6 to 3.0.4 manager ok site gives error 500

I updated a modx system from 2.8.1 to 2.8.6 → no problem
I made the next update from 2.8.6 to 3.0.4 → manager is ok, no problems, but site in frontend gives error 500 not available for every resource.

I got two errors in modx

[2024-01-13 15:07:51] (ERROR in MODX\Revolution\Transport\modTransportProvider::latest @ /var/www/XXXXX/core/src/Revolution/Transport/modTransportProvider.php : 264) Could not load updates for math-1.0-beta1: Latest Package Release Not Found<
and

[2024-01-13 15:10:43] (ERROR @ /var/www/XXXXX/core/components/lingua/model/lingua/lingua.class.php : 711) PHP warning: Undefined array key “cultureKey”<

I tried different versions of php 7.4, 8.0 and 8.2
I updated all extras
I often cleared cache manually
no change!

First I done upgrade directly from 2.8.1 to 3.0.4 with the same result.
It was the live version so I went back to 2.8.1

Now I try with a clon in a subdomain, but it is absolutly the same.

So where is the problem that the site gives always error 500?

Try to locate the server error log and check if something gets logged there.
Fatal PHP errors usually don’t get logged in the MODX error log.


You could also try (temporarily) deactivating the plugins in your MODX installation to see if that helps. It could be, that an extra you are using is not compatible with MODX 3.

The only error_log I could find at server is

[Sat Jan 13 07:25:58.092751 2024] [proxy_fcgi:error] [pid 1932:tid 140466781677312] [client 57.128.140.139:52598] AH01071: Got error ‘Primary script unknown’
[Sat Jan 13 08:09:12.981974 2024] [proxy_fcgi:error] [pid 8233:tid 140466722928384] [client 148.66.147.12:46790] AH01071: Got error ‘Primary script unknown’<
But this is not especially for this domain. For the subdomain I use, I have no error, or I could not find.

For deinstall extras I tried yesterday at the main domain installation but without reasult. But I can try again.

If you create a resource with the template = (empty), are you able to request that?

What is the exact error message you see when you try to view a page?
Is it a 500 error or maybe a “503 Service Unavailable” message from MODX?

It is definetly an error 500 site temporarly not available. At en empty resource the same.
This is a link to this resource
https://toninton2020.toninton.de/empty.html

Now I deinstall all extras, clear cache, but same result error 500 at all resources.

I don’t think you can get to the bottom of this issue without a specific error message.

Maybe try (temporarily) enabling display_errors (in the server config) to get an error message on screen. And enable error_reporting (if not already enabled).

Now I find these logs:

GET /musikinstrumente/english1/english1/franz2/english1/english1/franz2/franz2/franz2/english1/franz2/franz2/english1/franz2/english1/franz2/english1/english1/franz2/franz2/english1/franz2/english1/english1/english1/franz2/english1/franz2/franz2/english1/franz2/franz2/english1/english1/english1/english1/english1/franz2/startfranz.html HTTP/1.0<
AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Class ‘LinguaRequest’ not found in /var/www/XXXXX/httpdocs/toninton2020_2/core/src/Revolution/modX.php:1518\nStack trace:\n#0 /var/wwwXXXXX/httpdocs/toninton2020_2/core/src/Revolution/modX.php(1498): MODX\Revolution\modX->getRequest()\n#1 /var/www/XXXXX/httpdocs/toninton2020_2/index.php(63): MODX\Revolution\modX->handleRequest()\n#2 {main}\n thrown in /var/www/XXXXX/httpdocs/toninton2020_2/core/src/Revolution/modX.php on line 1518’<

It seems to be a problem with lingua

As far as I know, Lingua is not compatible with MODX 3:

There seems to be a pull request on Github to make it work on MODX 3, but the extra was never updated.


For now it’s probably best to stick with the MODX 2.x branch, if you want to use Lingua.

Ok. And even I seen that it is a problem to install lingua again in extras.
So what is the alternative for a mutli lingua site in modx?
In further futrure I would like to go to a php8 compatible version, Than I need a practicabel alternative to lingua.

Use a different context in MODX for every language.
Install a router extra (like e.g. LangRouter) to switch to the correct context and the extra Babel to link resources from different languages.

actual i I deinstall lingua and delete the call in the template, slear cache, the site has still error 500.
Before I can try to install an other system for multilingua I need a functional site.

Actual my problem is to delete lingua from my site.
I delete the package lingua, I delete the calling for Lingua in templates and I delte the chunks for lingua.
Than I done a new update to modx3.0.4
But I still get the same result: page error 500, temporarly not available and still the same error at server

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class “LinguaRequest” not found in [/var/www/vhosts/XXXXX/core/src/Revolution/modX.php]1518

Where comes this calling for “LinguaRequest” from?
How can I deliminate this calling?

Make sure that the plugin “Lingua” is deleted.
Also check the system setting extension_packages to make sure, Lingua isn’t part of the setting anymore.

If you added a context setting “modRequest.class” (as described in the documentation), then delete this as well.

Also, make sure that the core/components/lingua and assets/components/lingua directories don’t exist any more.

You may have look in the modx_namespaces table in the database to make sure the lingua namespace has been removed. Manually delete all files in the core/cache directory after making any changes, and visit the site with your browser in incognito or private mode.

Thank you for your help, but still no solution.
There been the context setting “modRequest.class” and I delete it
I checked the directories - been already deleted
I checked database modx_namespaces - no entry for lingua
I cleared cache manually and use a new browser, but still get the error 500 when I call for a site
But now I get a new error-mesage at the server

AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/vhosts/XXXX/core/cache/includes/elements/modx/revolution/modsnippet/13.include.cache.php:183\nStack trace:\n#0 /var/www/vhosts/XXXX/core/src/Revolution/modScript.php(88): include()\n#1 /var/www/vhosts/XXXX/core/src/Revolution/modParser.php(508): MODX\Revolution\modScript->process()\n#2 /var/www/vhosts/XXXX/core/components/pdotools/src/Parsing/Parser.php(276): MODX\Revolution\modParser->processTag()\n#3 /var/www/vhosts/XXXX/core/src/Revolution/modParser.php(221): ModxPro\PdoTools\Parsing\Parser->processTag()\n#4 /var/www/vhosts/XXXX/core/components/pdotools/src/Parsing/Parser.php(73)…’

What is the snippet with the ID = 13 on your system?

The snippet with ID 13 is getImageList from MIGX.

Is MIGX up-to-date?

I think on MODX3 you should be at MIGX 3.0.2-beta1

MIGX is the actual version 3.0.2-beta1

1 Like