Probleme beim Update von Contao 4.13.18 auf 5.1
Hi Leute,
ich führe gerade ein Update durch und stehe vor folgendem Problem:
> Resolving dependencies using Composer Cloud v3.5.1
[7.3MiB/0.17s] Loading composer repositories with package information
[69.5MiB/6.99s] Updating dependencies
[133.5MiB/7.52s] Your requirements could not be resolved to an installable set of packages.
[133.5MiB/7.52s]
Problem 1
- codefog/contao-news_categories[3.5.0, ..., 3.5.1] require contao/news-bundle ^4.13 -> found contao/news-bundle[4.13.0, ..., 4.13.18] but it conflicts with your root composer.json require (5.1.*).
- Root composer.json requires codefog/contao-news_categories ^3.5 -> satisfiable by codefog/contao-news_categories[3.5.0, 3.5.1].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
[133.5MiB/7.52s] <warning>Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.</warning>
[38.5MiB/7.58s] Memory usage: 38.53MB (peak: 181.38MB), time: 7.59s.
[38.5MiB/7.58s] Finished Composer Cloud resolving.
# Cloud Job ID i2ikNCeVcUWu5ZOFth1PvD3wQBcP1mNTK8Px1nHqeAzpehOUA4 yAo9dNpORV0cntVX0Im6P9999WBR13mX4Cfs70rIoqL1pN3Vja ppuXyN58Fj9e4DMWIz5cW4KSLi failed
Meine composer.json schaut so hier aus:
HTML-Code:
{
"type": "project",
"require": {
"php": "^8.1",
"alnv/catalog-manager": "^1.32",
"codefog/contao-news_categories": "^3.5",
"contao/calendar-bundle": "5.1.*",
"contao/comments-bundle": "5.1.*",
"contao/conflicts": "*@dev",
"contao/faq-bundle": "5.1.*",
"contao/listing-bundle": "5.1.*",
"contao/manager-bundle": "5.1.*",
"contao/news-bundle": "5.1.*",
"contao/newsletter-bundle": "5.1.*",
"do-while/contao-backupdb-bundle": "^1.5",
"hypergalaktisch/contao-parallax": "^2.0",
"jrgregory/m17-sticky-backend-footer": "^2.0",
"mathcontao/be_piwikcharts": "^1.8",
"numero2/contao-marketing-suite": "^1.0",
"oveleon/contao-cookiebar": "^1.12",
"symfony/framework-bundle": "^5.4",
"terminal42/contao-changelanguage": "^3.3",
"terminal42/contao-easy_themes": "^2.2",
"terminal42/contao-mailusername": "^1.0",
"terminal42/contao-rte_table": "^1.0",
"terminal42/notification_center": "^1.7",
"trilobit-gmbh/contao-headerfootercode-bundle": "^1.1"
},
"extra": {
"contao-component-dir": "assets",
"symfony": {
"require": "^4.2"
},
"public-dir": "web"
},
"scripts": {
"post-install-cmd": [
"@php vendor/bin/contao-setup"
],
"post-update-cmd": [
"@php vendor/bin/contao-setup"
]
}
}
Wie muß man hier weiter verfahren?
Liste der Anhänge anzeigen (Anzahl: 1)
Ich bekomme es nicht hin.
Das hier ist im CM eingestellt:
Anhang 26373
composer.json:
PHP-Code:
{
"type": "project",
"require": {
"php": "^8.0",
"alnv/catalog-manager": "^1.32",
"contao/calendar-bundle": "5.1.*",
"contao/comments-bundle": "5.1.*",
"contao/conflicts": "*@dev",
"contao/faq-bundle": "5.1.*",
"contao/listing-bundle": "5.1.*",
"contao/manager-bundle": "5.1.*",
"contao/news-bundle": "5.1.*",
"contao/newsletter-bundle": "5.1.*",
"do-while/contao-backupdb-bundle": "^1.5",
"hypergalaktisch/contao-parallax": "^2.0",
"jrgregory/m17-sticky-backend-footer": "^2.0",
"mathcontao/be_piwikcharts": "^1.8",
"numero2/contao-marketing-suite": "^1.0",
"oveleon/contao-cookiebar": "^1.12",
"symfony/framework-bundle": "^6.1",
"terminal42/contao-changelanguage": "^3.5",
"terminal42/contao-easy_themes": "^2.2",
"terminal42/contao-mailusername": "^1.0",
"terminal42/contao-rte_table": "^1.0",
"terminal42/notification_center": "^1.7",
"trilobit-gmbh/contao-headerfootercode-bundle": "^1.1"
},
"extra": {
"contao-component-dir": "assets",
"symfony": {
"require": "^4.2"
},
"public-dir": "web"
},
"scripts": {
"post-install-cmd": [
"@php vendor/bin/contao-setup"
],
"post-update-cmd": [
"@php vendor/bin/contao-setup"
]
}
}
CM gibt diese Fehlermeldung aus:
Resolving dependencies using Composer Cloud v3.6.0
[7.2MiB/0.17s] Loading composer repositories with package information
[69.2MiB/7.31s] Updating dependencies
[133.8MiB/8.30s] Your requirements could not be resolved to an installable set of packages.
[133.8MiB/8.30s]
Problem 1
- contao/core-bundle 4.4.0 requires symfony/framework-bundle ^3.3 -> found symfony/framework-bundle[v3.3.0, ..., v3.4.47] but it conflicts with your root composer.json require (^6.1).
- contao/core-bundle[4.4.1, ..., 4.4.17] require php ^5.6|^7.0 -> your php version (8.1.13.0) does not satisfy that requirement.
- contao/core-bundle[4.4.18, ..., 4.4.57] require php ^5.6 || ^7.0 -> your php version (8.1.13.0) does not satisfy that requirement.
- contao/core-bundle[4.5.0, ..., 4.8.8] require php ^7.1 -> your php version (8.1.13.0) does not satisfy that requirement.
- contao/core-bundle[4.9.0, ..., 4.10.4] require php ^7.2 -> your php version (8.1.13.0) does not satisfy that requirement.
- contao/core-bundle[4.9.10, ..., 4.10.7] require symfony/framework-bundle 4.4.* -> found symfony/framework-bundle[v4.4.0, ..., v4.4.49] but it conflicts with your root composer.json require (^6.1).
- contao/core-bundle[4.11.0, ..., 4.11.9] require symfony/framework-bundle 4.4.* || 5.2.* -> found symfony/framework-bundle[v4.4.0, ..., v4.4.49, v5.2.0, ..., v5.2.12] but it conflicts with your root composer.json require (^6.1).
- contao/core-bundle[4.12.0, ..., 4.12.7] require symfony/framework-bundle ^4.4 || ^5.2 -> found symfony/framework-bundle[v4.4.0, ..., v4.4.49, v5.2.0, ..., v5.4.22] but it conflicts with your root composer.json require (^6.1).
- contao/core-bundle[4.13.0, ..., 4.13.19] require symfony/framework-bundle ^5.4 -> found symfony/framework-bundle[v5.4.0, ..., v5.4.22] but it conflicts with your root composer.json require (^6.1).
- trilobit-gmbh/contao-headerfootercode-bundle 1.1.0 requires contao/core-bundle ~4.4 -> satisfiable by contao/core-bundle[4.4.0, ..., 4.13.19].
- Root composer.json requires trilobit-gmbh/contao-headerfootercode-bundle ^1.1 -> satisfiable by trilobit-gmbh/contao-headerfootercode-bundle[1.1.0].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
[133.8MiB/8.30s] <warning>Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.</warning>
[38.4MiB/8.36s] Memory usage: 38.42MB (peak: 180.29MB), time: 8.36s.
[38.4MiB/8.36s] Finished Composer Cloud resolving.
# Cloud Job ID ctWFT94Tk2wnAmk9wXbt4YsFOAM1LALPpqRShjNXBS63KNhu1e 6TrRx00S06qbQaUFJleieb1mECsPKzSrqvR0LDEiyIR failed
vendor/bin/contao-console contao:maintenance-mode enable
composer install --dry-run
vendor/bin/contao-console contao:maintenance-mode disable
Liste der Anhänge anzeigen (Anzahl: 1)
Okay, danke. Habe alle Erweiterungen deinstalliert.
Jetzt kommt diese Fehlermeldung mit der composer install:
Anhang 26375
Code:
$ /usr/local/bin/php_cli -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=Europe/Berlin /html/cto_5_1/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.
Package operations: 4 installs, 51 updates, 3 removals
- Removing symfony/security-guard (v5.4.22)
- Removing sensiolabs/ansi-to-html (v1.2.1)
- Removing contao/installation-bundle (4.13.19)
- Upgrading contao-components/tinymce4 (5.10.7 => 6.4.1): Extracting archive
- Installing contao-components/tristen-tablesort (5.3.0): Extracting archive
- Upgrading symfony/yaml (v5.4.21 => v6.2.7): Extracting archive
- Upgrading symfony/event-dispatcher (v5.4.22 => v6.2.8): Extracting archive
- Upgrading symfony/var-dumper (v5.4.22 => v6.2.8): Extracting archive
- Downgrading psr/log (2.0.0 => 1.1.4): Extracting archive
- Upgrading symfony/error-handler (v5.4.21 => v6.2.7): Extracting archive
- Upgrading symfony/dependency-injection (v5.4.22 => v6.2.8): Extracting archive
- Upgrading symfony/filesystem (v5.4.21 => v6.2.7): Extracting archive
- Upgrading symfony/config (v5.4.21 => v6.2.7): Extracting archive
- Upgrading symfony/http-client-contracts (v2.5.2 => v3.2.1): Extracting archive
- Upgrading symfony/http-client (v5.4.22 => v6.2.8): Extracting archive
- Upgrading symfony/string (v5.4.22 => v6.2.8): Extracting archive
- Installing twig/string-extra (v3.5.1): Extracting archive
- Installing masterminds/html5 (2.7.6): Extracting archive
- Upgrading symfony/dom-crawler (v5.4.22 => v6.2.8): Extracting archive
- Upgrading symfony/uid (v5.4.21 => v6.2.7): Extracting archive
- Upgrading symfony/twig-bridge (v5.4.22 => v6.1.11): Extracting archive
- Upgrading symfony/twig-bundle (v5.4.21 => v6.1.11): Extracting archive
- Upgrading symfony/translation (v5.4.22 => v6.2.8): Extracting archive
- Upgrading symfony/password-hasher (v5.4.21 => v6.2.7): Extracting archive
- Upgrading symfony/security-core (v5.4.22 => v6.2.8): Extracting archive
- Upgrading symfony/property-access (v5.4.22 => v6.2.8): Extracting archive
- Upgrading symfony/security-http (v5.4.22 => v6.0.20): Extracting archive
- Upgrading symfony/security-csrf (v5.4.21 => v6.2.7): Extracting archive
- Upgrading symfony/security-bundle (v5.4.22 => v6.1.12): Extracting archive
- Upgrading symfony/process (v5.4.22 => v6.2.8): Extracting archive
- Upgrading symfony/monolog-bridge (v5.4.22 => v6.2.8): Extracting archive
- Upgrading symfony/mime (v5.4.21 => v6.2.7): Extracting archive
- Downgrading egulias/email-validator (4.0.1 => 3.2.5): Extracting archive
- Upgrading symfony/mailer (v5.4.22 => v6.2.0): Extracting archive
- Upgrading symfony/intl (v5.4.22 => v6.2.8): Extracting archive
- Upgrading symfony/finder (v5.4.21 => v6.2.7): Extracting archive
- Upgrading symfony/expression-language (v5.4.21 => v6.2.7): Extracting archive
- Upgrading doctrine/event-manager (1.2.0 => 2.0.0): Extracting archive
- Upgrading symfony/doctrine-bridge (v5.4.22 => v6.1.11): Extracting archive
- Upgrading symfony/console (v5.4.22 => v6.2.8): Extracting archive
- Upgrading symfony/asset (v5.4.21 => v6.2.7): Extracting archive
- Upgrading scheb/2fa-bundle (v5.13.2 => v6.8.0): Extracting archive
- Upgrading scheb/2fa-trusted-device (v5.13.2 => v6.8.0): Extracting archive
- Upgrading scheb/2fa-backup-code (v5.13.2 => v6.8.0): Extracting archive
- Upgrading contao/core-bundle (4.13.19 => 5.0.10): Extracting archive
- Upgrading contao/calendar-bundle (4.13.19 => 5.0.10): Extracting archive
- Upgrading contao/comments-bundle (4.13.19 => 5.0.10): Extracting archive
- Upgrading contao/faq-bundle (4.13.19 => 5.0.10): Extracting archive
- Upgrading contao/listing-bundle (4.13.19 => 5.0.10): Extracting archive
- Upgrading symfony/web-profiler-bundle (v5.4.21 => v6.0.19): Extracting archive
- Upgrading symfony/stopwatch (v5.4.21 => v6.2.7): Extracting archive
- Upgrading symfony/proxy-manager-bridge (v5.4.21 => v6.2.7): Extracting archive
- Upgrading symfony/dotenv (v5.4.22 => v6.2.8): Extracting archive
- Upgrading symfony/debug-bundle (v5.4.21 => v6.2.7): Extracting archive
- Upgrading contao/manager-bundle (4.13.19 => 5.0.10): Extracting archive
- Installing debril/feed-io (v6.0.2): Extracting archive
- Upgrading contao/news-bundle (4.13.19 => 5.0.10): Extracting archive
- Upgrading contao/newsletter-bundle (4.13.19 => 5.0.10): Extracting archive
Generating optimized autoload files
contao/manager-plugin: Dumping generated plugins file...
contao/manager-plugin: ...done dumping generated plugins file
Class Contao\ManagerPlugin\PluginLoader located in ./vendor/contao/manager-plugin/src/Resources/PluginLoader.php does not comply with psr-4 autoloading standard. Skipping.
104 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php vendor/bin/contao-setup
In ArrayNode.php line 304:
Unrecognized option "url_suffix" under "contao". Available options are "bac
kend", "backup", "crawl", "csrf_cookie_prefix", "csrf_token_name", "editabl
e_files", "error_level", "image", "insert_tags", "intl", "localconfig", "lo
cales", "mailer", "pretty_error_screens", "preview_script", "sanitizer", "s
earch", "security", "upload_path", "web_dir".
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
Meine composer.json:
Code:
{
"type": "project",
"require": {
"php": "^8.1",
"contao/calendar-bundle": "5.0.*",
"contao/comments-bundle": "5.0.*",
"contao/conflicts": "*@dev",
"contao/faq-bundle": "5.0.*",
"contao/listing-bundle": "5.0.*",
"contao/manager-bundle": "5.0.*",
"contao/news-bundle": "5.0.*",
"contao/newsletter-bundle": "5.0.*",
"symfony/framework-bundle": "^5.4",
"trilobit-gmbh/contao-headerfootercode-bundle": "^2.0"
},
"extra": {
"contao-component-dir": "assets",
"symfony": {
"require": "^4.2"
},
"public-dir": "public"
},
"scripts": {
"post-install-cmd": [
"@php vendor/bin/contao-setup"
],
"post-update-cmd": [
"@php vendor/bin/contao-setup"
]
}
}
Wie muß man hier weiter verfahren?
Liste der Anhänge anzeigen (Anzahl: 2)
Oje, jetzt raucht mit bissl der Kopf.
Ich habe "eigene_Templates" in "eigene-Templates" schon umbenannt, und bekomme im Frontend eine Fehlermeldung. In der Logdatei steht das hier drin:
Code:
[2023-04-12T13:33:29.227432+02:00] request.INFO: Matched route "tl_page.2.root". {"route":"tl_page.2.root","route_parameters":{"_token_check":true,"_controller":"Contao\\FrontendIndex::renderPage","_scope":"frontend","_locale":"de","_format":"html","_canonical_route":"tl_page.2","parameters":"","pageModel":{"Contao\\PageModel":[]},"_route":"tl_page.2.root","_route_object":{"Symfony\\Component\\Routing\\Route":[]}},"request_uri":"https://update.internet-projekt-service.de/preview.php/","method":"GET"} []
[2023-04-12T13:33:29.263053+02:00] request.CRITICAL: Uncaught PHP Exception Contao\CoreBundle\Exception\InvalidThemePathException: "The theme path "eigene_Templates" contains one or more invalid characters: "_"" at /html/cto_5_1/vendor/contao/core-bundle/src/Twig/Loader/ThemeNamespace.php line 52 {"exception":"[object] (Contao\\CoreBundle\\Exception\\InvalidThemePathException(code: 0): The theme path \"eigene_Templates\" contains one or more invalid characters: \"_\" at /html/cto_5_1/vendor/contao/core-bundle/src/Twig/Loader/ThemeNamespace.php:52)"} []
[2023-04-12T13:33:29.303974+02:00] messenger.INFO: Sending message Contao\CoreBundle\Messenger\Message\SearchIndexMessage with contao_prio_low sender using Contao\CoreBundle\Messenger\Transport\AutoFallbackTransport {"class":"Contao\\CoreBundle\\Messenger\\Message\\SearchIndexMessage","alias":"contao_prio_low","sender":"Contao\\CoreBundle\\Messenger\\Transport\\AutoFallbackTransport"} []
[2023-04-12T13:33:29.304205+02:00] messenger.INFO: Received message Contao\CoreBundle\Messenger\Message\SearchIndexMessage {"class":"Contao\\CoreBundle\\Messenger\\Message\\SearchIndexMessage"} []
[2023-04-12T13:33:29.306685+02:00] messenger.INFO: Message Contao\CoreBundle\Messenger\Message\SearchIndexMessage handled by Contao\CoreBundle\Messenger\MessageHandler\SearchIndexMessageHandler::__invoke {"class":"Contao\\CoreBundle\\Messenger\\Message\\SearchIndexMessage","handler":"Contao\\CoreBundle\\Messenger\\MessageHandler\\SearchIndexMessageHandler::__invoke"} []
Mein Verzeichnis auf dem Server lautet cto_5_1, also auch mit den Unterstrichen. Muß ich dieses Verzeichnis auch umchreiben in cto-5-1 ? Oder hat die Fehlermeldung damit nichts zu tun?
Die Datei ThemeNamespace.php, da steht in Zeile 52:
Anhang 26385
PHP-Code:
<?php
declare(strict_types=1);
/*
* This file is part of Contao.
*
* (c) Leo Feyer
*
* @license LGPL-3.0-or-later
*/
namespace Contao\CoreBundle\Twig\Loader;
use Contao\CoreBundle\Exception\InvalidThemePathException;
use Symfony\Component\Filesystem\Path;
class ThemeNamespace
{
/**
* Generates a theme slug from a relative path.
*
* @throws InvalidThemePathException if the path contains invalid characters
*/
public function generateSlug(string $relativePath): string
{
if (!Path::isRelative($relativePath)) {
throw new \InvalidArgumentException(sprintf('Path "%s" must be relative.', $relativePath));
}
$path = Path::normalize($relativePath);
$invalidCharacters = [];
$slug = implode('_', array_map(
static function (string $chunk) use (&$invalidCharacters) {
// Allow paths outside the template directory (see #3271)
if ('..' === $chunk) {
return '';
}
// Check for invalid characters (see #3354)
if (0 !== preg_match_all('%[^a-zA-Z0-9-]%', $chunk, $matches)) {
$invalidCharacters = array_merge($invalidCharacters, $matches[0]);
}
return $chunk;
},
explode('/', $path)
));
if (!empty($invalidCharacters)) {
throw new InvalidThemePathException($path, $invalidCharacters);
}
return $slug;
}
/**
* Builds the namespace for a certain theme slug.
*/
public function getFromSlug(string $slug): string
{
return "@Contao_Theme_$slug";
}
/**
* Extracts a theme slug from a given logical name.
*
* @return string the theme slug or null if not a theme namespace
*/
public function match(string $logicalName): string|null
{
if (1 === preg_match('%^@Contao_Theme_([a-zA-Z0-9_-]+)/%', $logicalName, $matches)) {
return $matches[1];
}
return null;
}
}
Im Templates sieht es so hier aus:
Anhang 26387
Müssen die einzelnen Templates, wie fe_page.html5 ebenfalls umgeschrieben werden, in fe-page.html5 ?