Das Problem mit upgrade 4.13 -> 5.3 und "Service existiert nicht"
Hallo zusammen,
Ich habe meine Contao-Website von 4.13.38 auf 5.3.1 aktualisiert. Alles war erfolgreich, der Contao Manager funktioniert einwandfrei, aber die Website funktioniert nicht. Der Fehler wird in var/logs geschrieben und weist auf einen nicht vorhandenen Service „contao.image.image_sizes“ hin:
Code:
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/",
"request_method":
"GET"
}
Sowohl FE als auch BE funktionieren nicht.
Was könnte hier das Problem sein? Ich habe im Internet nach einer Lösung gesucht, aber obwohl es ähnliche Fragen gab, habe ich keine wirkliche Lösung gefunden.
Neben Contao-Core sind in Contao auch Rocksolidthemes-Plugins (MadeYourDay) installiert.
You have requested a non-existent service "contao.image.image_sizes"
Contao 5.3.1
Lokale Installation laragon unter php82
Der Versuch con4gis-Maps in der neuen Version 8.2.19 zu installieren endet mit einem Error.
PHP-Code:
$ C:\laragon\bin\php\php-8.2.16-Win32-vs16-x64\php.EXE -q -dmax_execution_time=0 -dmemory_limit=-1 -ddisplay_errors=0 -ddisplay_startup_errors=0 -derror_reporting=0 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=UTC C:/laragon/www/kit/public/contao-manager.phar.php composer install --no-dev --no-progress --no-ansi --no-interaction --optimize-autoloader
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package php-http/message-factory is abandoned, you should avoid using it. Use psr/http-factory instead.
Generating optimized autoload files
Class Contao\ManagerPlugin\PluginLoader located in C:/laragon/www/kit/vendor/contao/manager-plugin/src\Resources\PluginLoader.php does not comply with psr-4 autoloading standard. Skipping.
contao/manager-plugin: Dumping generated plugins file...
contao/manager-plugin: ...done dumping generated plugins file
118 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php vendor/bin/contao-setup
Added the bin/console file.
Added the public/index.php file.
Added the public/preview.php file.
Trying to install assets as relative symbolic links.
--------- ------------------------------- ------------------
Bundle Method / Error
--------- ------------------------------- ------------------
WARNING ContaoCoreBundle absolute symlink
WARNING RockSolidCustomElementsBundle absolute symlink
WARNING ContaoCookiebar absolute symlink
WARNING MultiColumnWizardBundle absolute symlink
WARNING ContaoGLightboxBundle absolute symlink
WARNING ContaoFaqBundle absolute symlink
WARNING ContaoNewsBundle absolute symlink
WARNING RockSolidFrontendHelperBundle absolute symlink
WARNING con4gisCoreBundle absolute symlink
WARNING ContaoCalendarBundle absolute symlink
WARNING ContaoNewsletterBundle absolute symlink
WARNING RockSolidIconPickerBundle absolute symlink
WARNING con4gisMapsBundle absolute symlink
WARNING ContaoCommentsBundle absolute symlink
--------- ------------------------------- ------------------
[OK] All assets were successfully installed.
---- ------------------------------------------- --------------------------------------------------
Symlink Target / Error
---- ------------------------------------------- --------------------------------------------------
OK public/files/assets files/assets
OK public/files/kit files/kit
OK public/system/modules/sharebuttons/assets system/modules/sharebuttons/assets
OK system/themes/flexible vendor/contao/core-bundle/contao/themes/flexible
OK public/assets assets
OK public/system/themes system/themes
OK system/logs var/logs
OK public/vendor/scrivo/highlight_php/styles vendor/scrivo/highlight.php/styles
---- ------------------------------------------- --------------------------------------------------
// Clearing the cache for the prod environment with debug false
[OK] Cache for the "prod" environment (debug=false) was successfully cleared.
// Clearing the cache for the dev environment with debug true
[OK] Cache for the "dev" environment (debug=true) was successfully cleared.
// Warming up the cache for the prod environment with debug false
15:58:17 CRITICAL [console] Error thrown while running command "cache:warmup --env=prod --no-ansi". Message: "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"?" ["exception" => Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException { …},"command" => "cache:warmup --env=prod --no-ansi","message" => "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"?"]
In Container.php line 263:
You have requested a non-existent service "contao.image.image_sizes". Did you mean one of these: "contao.image.imag
ine", "contao.image.imagine_svg", "contao.image.resizer", "contao.image.sizes"?
cache:warmup [--no-optional-warmers]
14:58:17 CRITICAL [console] An error occurred while using the console. Message: "An error occurred while executing the "C:\laragon\bin\php\php-8.2.16-Win32-vs16-x64\php.exe -dmemory_limit=-1 C:/laragon/www/kit/vendor/contao/manager-bundle/bin/contao-console cache:warmup --env=prod --no-ansi" command: 15:58:17 CRITICAL [console] Error thrown while running command "cache:warmup --env=prod --no-ansi". Message: "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"?" ["exception" => Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException { …},"command" => "cache:warmup --env=prod --no-ansi","message" => "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"?"]
In Container.php line 263:
You have requested a non-existent service "contao.image.image_sizes". Did you mean one of these: "contao.image.imag
ine", "contao.image.imagine_svg", "contao.image.resizer", "contao.image.sizes"?
cache:warmup [--no-optional-warmers]
" ["exception" => RuntimeException { …},"message" => """ An error occurred while executing the "C:\laragon\bin\php\php-8.2.16-Win32-vs16-x64\php.exe -dmemory_limit=-1 C:/laragon/www/kit/vendor/contao/manager-bundle/bin/contao-console cache:warmup --env=prod --no-ansi" command: 15:58:17 CRITICAL [console] Error thrown while running command "cache:warmup --env=prod --no-ansi". Message: "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"?" ["exception" => Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException { …},"command" => "cache:warmup --env=prod --no-ansi","message" => "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"?"]\n \r\n In Container.php line 263:\r\n \r\n You have requested a non-existent service "contao.image.image_sizes". Did you mean one of these: "contao.image.imag \r\n ine", "contao.image.imagine_svg", "contao.image.resizer", "contao.image.sizes"? \r\n \r\n \r\n cache:warmup [--no-optional-warmers]\r\n \r\n """]
In ContaoSetupCommand.php line 142:
An error occurred while executing the "C:\laragon\bin\php\php-8.2.16-Win32-vs16-x64\php.exe -dmemory_limit=-1 C:/la
ragon/www/kit/vendor/contao/manager-bundle/bin/contao-console cache:warmup --env=prod --no-ansi" command: 15:58:17
CRITICAL [console] Error thrown while running command "cache:warmup --env=prod --no-ansi". Message: "You have requ
ested 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"?" ["exception" => Symfony\Component\DependencyInj
ection\Exception\ServiceNotFoundException { …},"command" => "cache:warmup --env=prod --no-ansi","message" => "You h
ave 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"?"]
In Container.php line 263:
You have requested a non-existent service "contao.image.image_sizes". Did you mean one of these: "contao.image.im
ag
ine", "contao.image.imagine_svg", "contao.image.resizer", "contao.image.sizes"?
cache:warmup [--no-optional-warmers]
contao:setup
Script @php vendor/bin/contao-setup handling the post-install-cmd event returned with error code 1
# Process terminated with exit code 1
# Result: General error
Die Fehlermeldung, so denke ich, kommt mir bekannt vor: siehe thread
Der Fehler taucht nicht auf, wenn ich con4gis wieder entferne.
Meine composer.json:
PHP-Code:
{
"type": "project",
"require": {
"contao/calendar-bundle": "5.3.*",
"contao/comments-bundle": "5.3.*",
"contao/conflicts": "*@dev",
"contao/faq-bundle": "5.3.*",
"contao/listing-bundle": "5.3.*",
"contao/manager-bundle": "5.3.*",
"contao/news-bundle": "5.3.*",
"contao/newsletter-bundle": "5.3.*",
"fritzmg/contao-sharebuttons": "^2.2",
"inspiredminds/contao-glightbox": "^1.0",
"madeyourday/contao-rocksolid-custom-elements": "^2.4",
"madeyourday/contao-rocksolid-frontend-helper": "^2.2",
"madeyourday/contao-rocksolid-icon-picker": "^2.1",
"oveleon/contao-cookiebar": "2.0.0-RC2"
},
"extra": {
"public-dir": "public",
"contao-component-dir": "assets"
},
"scripts": {
"post-install-cmd": [
"@php vendor/bin/contao-setup"
],
"post-update-cmd": [
"@php vendor/bin/contao-setup"
]
},
"config": {
"allow-plugins": {
"contao-components/installer": true,
"contao/manager-plugin": true,
"contao-community-alliance/composer-plugin": true,
"php-http/discovery": true
}
}
}
Freue mich auf Hilfestellung - Danke schon mal