Upgrade from 2.8.6 to 3.0.4 manager ok site gives error 500

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

Can you check the line 183 of this file?
Is it this line?

If that’s the case, then the variable $items is somehow null.


If you want to debug why $items is null, try adding some code like this

if ($items === null){
    $modx->log(modX::LOG_LEVEL_ERROR, 'Incorrect JSON? ' . $outputvalue);
}

in the snippet before line 183 (and then check the MODX error log).
Maybe the JSON in $outputvalue is wrong (on line 177) or filterItems (line 181) returns null?


To (temporarily) fix the fatal error, add code like this in the snippet “getImageList” before line 183.

if ($items === null){
    $items = [];
}

The line 183 in core/cache/includes/elements/modx/revolution/modsnippet/13.include,cache.php i like you posted

  1. $modx->setPlaceholder($totalVar, count($items));

If I set before line 183

if ($items === null){
$modx->log(modX::LOG_LEVEL_ERROR, 'Incorrect JSON? ’ . $outputvalue);
}

I get this error at 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/XXXXX/core/cache/includes/elements/modx/revolution/modsnippet/13.include.cache.php:186\nStack trace:\n#0 /var/www/vhosts/XXXXX/core/src/Revolution/modScript.php(88): include()\n#1 /var/www/vhosts/XXXXX/core/src/Revolution/modParser.php(508): MODX\Revolution\modScript->process()\n#2 /var/www/vhosts/XXXXX/core/components/pdotools/src/Parsing/Parser.php(276): MODX\Revolution\modParser->processTag()\n#3 /var/www/vhosts/XXXXX/core/src/Revolution/modParser.php(221): ModxPro\PdoTools\Parsing\Parser->processTag()\n#4 /var/www/vhosts/XXXXX/core/components/pdotools/src/Parsing/Parser.php(73)…’

If I set before line 183

if ($items === null){
$items = ;
}

I get the site (yeahhh!) but without logged in with error 404 and when I logged in with content but without navigation.

I actually checked the logs in MODX.
If I call a site I get this log in MODX

[2024-01-18 20:20:20] (ERROR @ /var/www/vhosts/XXXXX/core/src/Revolution/modParser.php : 512) Could not find snippet with name lingua.getValue.

Why is here still called for LIngua?
I thought I had delete every part of Lingua.
An other error in MODX is

[2024-01-18 20:20:20] (ERROR in resource 30 @ /var/www/vhosts/XXXX/core/src/Revolution/modLinkTag.php : 108) Bad link tag [[~]] encountered

Is this relevant for MODX 3.0 ?