404 error on all pages in all contexts except web

We have several contexts for multi language site. This worked on Modx 2.7 for a year and also on MODX3 & php8.1 since 1 Jan 2023 using Babel and Xrouter.

Suddenly all the pages in the contexts (apart from web) are showing as 404. I also get 404 when trying to access the context pages via index.php?id=xxx. There are no errors or warnings logged.

Each context has anonymous (member and load only) and administrator. Babel & Xrouter are providing the correct URLS.

I have deleted the core/cache folder to no avail.

Does anyone have any ideas please?


Ruth Edmondson

MODX 3.03, php 8.1

xRouting generates some warnings in PHP 8.

You can try the 1.5.0 from XRouting/xrouting-1.5.0-pl.transport.zip at cce282f40b46eb2d26fd2092d4efd983496d79ff · Jako/XRouting · GitHub which generates no warnings anymore. Maybe that helps.

Thanks, I’ve tried this, but it doesn’t work. Using the debug option in xrouting shows the right context (it) and the right page, but the page loading is the error page for ‘web’ context (not the error page for ‘it’). If I add $contextKey = ‘it’ just before initialize context in index.php, it works.

The pages are still working OK on localhost - the debug page is exactly the same as the online debug page. So are all the context settings and permissions…