phpsymfonyuncaught-exceptioncontao

Non-existing service after the upgrade


I upgraded my Contao website from 4.13.38 to 5.3.1. Everything was successful, Contao Manager is working okay, but the website is not functioning. The error is logged in var/logs and points to a non-existent service "contao.image.image_sizes":

Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: "You have requested a non-existent service "contao.image.image_sizes". Did you mean one of these: "contao.image.imagine", "contao.image.imagine_svg", "contao.image.resizer", "contao.image.sizes"?" at Container.php line 263

{
"exception": 
"[object] (Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException(code: 0): You have requested a non-existent service "contao.image.image_sizes". Did you mean one of these: "contao.image.imagine", "contao.image.imagine_svg", "contao.image.resizer", "contao.image.sizes"? at /opt/testportal/vendor/symfony/dependency-injection/Container.php:263)"
}
{
"request_uri": "https://testportal/contao/login",
"request_method": "GET"
}

Both FE and BE are not working.

What could be the problem here? I searched for solution in Internet, but although there were similar questions, I didn't find real solution.

Beside contao-core bundles, there are rocksolidthemes (madeyourday) plugins installed and upgraded.


Solution

  • When updating Contao you will also always need to update the theme, according to the theme vendor's instructions - especially when updating to new minor or major versions. In your case you did not update the RockSolid Custom Elements config files of the Oneo theme for example for the new Contao version which resulted in this error.