Upgrade mit Manager 4.4.40 auf 4.13 (Installation ursprünglich von 2009)
Hi zusammen,
sorry für die Wall of Text, Fragen stehen ganz unten. Übertreibe gerne mal mit den Infos ;)
Ich habe eine Contao-Installation geerbt, bei der irgendwie der Wurm drin ist. Da ich aber Contao noch nie benutzt habe, kann es auch an mir liegen :D
Vermute, die Installation wurde damals ca. 2009 mit Contao 2.x gemacht und dann immer hochgezogen, aber wahrscheinlich auch mal in neu neue Installation migriert.
Gibt einige Files die wahrscheinlich inzwischen obsolet sind?!
Ich vermute, der Contao-Manager wurde bisher nicht eingesetzt, zumindest habe ich keine manager-phar oder ein manager Verzeichnis gefunden.
Aktuell Version 4.4.40, Hosting: Ionos, Ziel: 4.13.*
System Check vom Manager
Code:
PHP Web Process
Found PHP version 7.4.32, no known issues found.
Server Configuration
PHP binary at /usr/bin/php7.4-cli.
Change
PHP Command Line Interface
Found PHP version 7.4.32, no known issues found.
Updates of Contao Manager
You are using the latest version 1.6.0.
Composer Environment
No known issues found.
Contao Installation
Found Contao 4.4.40 (API version 0).
# This file has been auto-generated during installation
parameters:
database_host: some.where
database_port: 007
database_user: user
database_password: something
database_name: dbname
secret: very
contao:
security:
disable_ip_check: true
Habe zuerst ein Backup-Script geschrieben, was DB dumpt und die komplette Installation tart. Ich hoffe das ich damit alles erwischt habe...:
mkdir -p "$directory"
#--no-tablespaces needed since db user doesnt have all permissions for the new tablespace feature
echo 'password is in ~/upgrade/app/config/parameters.yml'
mysqldump --host=some.where --port=007 --user=someuser --password --hex-blob --opt somedb --no-tablespaces | gzip -9 -c > "$directory"/contao_dump.sql.gz
#the installation also uses files under ~/upgrade, not only ~/upgrade/web
#also backs up the composer vendor directory and the contao var/cache directory
#use -w for interactive and confirmations
tar -zc -f "$directory"/contao_installation.tar.gz ~/upgrade
#restore files from backup after failed composer stuff
#backup tar entpacken (oder direkt aus der tar kopieren)
#tar -xvzp -f ./contao_installation.tar.gz -C .
#ggf contao-manager neu installieren und/oder contao-manager verzeichnis löschen
#restore db if needed
Ich habe mich dann zuerst an einigen Dry-Runs versucht, mir ist aber der Unterschied zwischen den Optionen ganz unten im grünen Dropdown
"Apply Changes" vs "Dry Run" vs "Dry Run all packages" vs "Update all packages"
nicht so ganz klar.
Auch kann ich ganz oben nicht "Update Packages" machen und unten ist beim Start schon "one unconfirmed Change".
Bei den dry runs kamen manchmal Hinweise und manchmal Fehler, siehe Logs. Weiss aber nicht mehr, welches Log zu welcher Aktion gehört :/:
Dry Runs
Der erste lief gut bis auf:
Code:
The "contao-components/installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.2.0"). You may need to run composer update with the "--no-plugins" option.
The "contao-community-alliance/composer-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.2.0"). You may need to run composer update with the "--no-plugins" option.
The "contao/manager-plugin" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.2.0"). You may need to run composer update with the "--no-plugins" option.
Der zweite:
Code:
> Resolving dependencies using Composer Cloud v3.5.0
!!! Current server is sponsored by: terminal42 gmbh !!!
[4.9MiB/0.22s] Loading composer repositories with package information
[5.5MiB/0.37s] Updating dependencies
[6.5MiB/0.40s] Your requirements could not be resolved to an installable set of packages.
[6.5MiB/0.40s]
Problem 1
- contao/manager-plugin 2.7.0 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.3.0] but it does not match the constraint.
- contao/manager-bundle 4.4.40 requires contao/manager-plugin ^2.1 -> satisfiable by contao/manager-plugin[2.7.0].
- contao/manager-bundle is locked to version 4.4.40 and an update of this package was not requested.
[6.5MiB/0.40s] 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.
[5.6MiB/0.41s] Memory usage: 5.63MB (peak: 6.96MB), time: 0.41s.
[5.6MiB/0.41s] Finished Composer Cloud resolving.
The "contao-components/installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.2.0"). You may need to run composer update with the "--no-plugins" option.
The "contao-community-alliance/composer-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.2.0"). You may need to run composer update with the "--no-plugins" option.
The "contao/manager-plugin" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.2.0"). You may need to run composer update with the "--no-plugins" option.
/kundenpfad/upgrade/composer.json has been updated
# Process terminated with exit code 0
# Result: OK
> Resolving dependencies using Composer Cloud v3.5.0
!!! Current server is sponsored by: terminal42 gmbh !!!
[4.9MiB/0.22s] Loading composer repositories with package information
[64.9MiB/7.63s] Updating dependencies
[117.2MiB/8.25s] Your requirements could not be resolved to an installable set of packages.
[117.2MiB/8.25s]
Problem 1
- contao/calendar-bundle[4.13.0, ..., 4.13.12] require symfony/config ^5.4 -> found symfony/config[v5.4.0, ..., v5.4.11] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires contao/calendar-bundle 4.13.* -> satisfiable by contao/calendar-bundle[4.13.0, ..., 4.13.12].
[117.2MiB/8.25s] 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.
[36.4MiB/8.30s] Memory usage: 36.43MB (peak: 172.76MB), time: 8.31s.
[36.4MiB/8.30s] Finished Composer Cloud resolving.
# Cloud Job ID xxx failed
Die Fehler weisen scheinbar auf Probleme Composer 1 vs 2 hin?! Dann habe ich gelesen, dass Contao Manager 1.4 / Composer 2.0 ggf ein "Composer Update" braucht und dieses mal über "Manager -> maintenance -> Composer Dependencies -> Run Composer Update" gemacht.
Dies lief eigentlich gut, aber kurz vor dem Ende kam
Code:
Update of codefog/contao-haste failed
Update of terminal42/contao-changelanguage failed
In AbstractModuleInstaller.php line 568:
"/kundenpfad/upgrade/system/modules/haste" is not a link
to "/kundenpfad/upgrade/vendor/codefog/contao-haste" (e
xpected "/kundenpfad/upgrade/vendor/codefog/contao-haste
" but got "/kundenpfad/upgrade/system/modules/haste")
Gesamtes Composer Update Log
Code:
> Resolving dependencies using Composer Cloud v3.5.0
!!! Current server is sponsored by: terminal42 gmbh !!!
[4.9MiB/0.21s] Loading composer repositories with package information
[5.1MiB/0.44s] Info from https://repo.packagist.org: #StandWithUkraine
[81.4MiB/12.58s] Updating dependencies
[39.2MiB/21.14s] Lock file operations: 13 installs, 92 updates, 2 removals
[39.2MiB/21.14s] - Removing leafo/scssphp (v0.7.8)
[39.2MiB/21.14s] - Removing symfony/polyfill-util (v1.11.0)
[39.2MiB/21.14s] - Upgrading clue/stream-filter (v1.4.1 => v1.6.0)
[39.2MiB/21.15s] - Upgrading codefog/contao-haste (4.23.4 => 4.25.23)
[39.2MiB/21.15s] - Upgrading composer/ca-bundle (1.1.4 => 1.3.4)
[39.2MiB/21.15s] - Upgrading contao-community-alliance/composer-plugin (3.0.9 => 3.1.6)
[39.2MiB/21.15s] - Upgrading contao-community-alliance/dependency-container (2.0.3 => 2.0.4)
[39.2MiB/21.15s] - Upgrading contao-community-alliance/events-contao-bindings (4.4.4 => 4.4.5)
[39.2MiB/21.15s] - Upgrading contao-community-alliance/translator (2.1.3 => 2.1.5)
[39.2MiB/21.15s] - Upgrading contao-components/ace (1.4.4 => 1.11.2)
[39.2MiB/21.15s] - Upgrading contao-components/chosen (1.2.1 => 1.2.5)
[39.2MiB/21.15s] - Upgrading contao-components/colorbox (1.6.4.1 => 1.6.6)
[39.2MiB/21.15s] - Upgrading contao-components/colorpicker (1.5.0 => 1.5.2)
[39.2MiB/21.15s] - Upgrading contao-components/contao (7.1.5 => 7.1.6)
[39.2MiB/21.16s] - Upgrading contao-components/datepicker (2.3.0 => 2.3.2)
[39.2MiB/21.16s] - Upgrading contao-components/installer (1.3.1 => 1.4.1)
[39.2MiB/21.16s] - Upgrading contao-components/jquery-ui (1.12.1.1 => 1.13.1)
[39.2MiB/21.16s] - Upgrading contao-components/mediabox (1.5.4.2 => 1.5.5)
[39.2MiB/21.16s] - Upgrading contao-components/mediaelement (4.2.10 => 4.2.14)
[39.2MiB/21.16s] - Upgrading contao-components/mootools (1.6.0.5 => 1.6.0.6)
[39.2MiB/21.16s] - Upgrading contao-components/simplemodal (2.1.0 => 2.1.1)
[39.2MiB/21.16s] - Upgrading contao-components/swipe (2.1.2 => 2.2.0)
[39.2MiB/21.16s] - Upgrading contao-components/tablesort (3.4.11 => 4.0.1)
[39.2MiB/21.16s] - Upgrading contao-components/tablesorter (2.1.0 => 2.31.3)
[39.2MiB/21.16s] - Upgrading contao-components/tinymce4 (4.6.7.2 => 4.6.7.3)
[39.2MiB/21.17s] - Upgrading contao/calendar-bundle (4.4.40 => 4.4.57)
[39.2MiB/21.17s] - Upgrading contao/comments-bundle (4.4.40 => 4.4.57)
[39.2MiB/21.17s] - Upgrading contao/conflicts (dev-master a3fd5c0 => dev-main aed826f)
[39.2MiB/21.17s] - Upgrading contao/core-bundle (4.4.40 => 4.4.57)
[39.2MiB/21.17s] - Upgrading contao/faq-bundle (4.4.40 => 4.4.57)
[39.2MiB/21.17s] - Upgrading contao/imagine-svg (0.2.2 => 0.2.3)
[39.2MiB/21.17s] - Upgrading contao/installation-bundle (4.4.40 => 4.4.57)
[39.2MiB/21.17s] - Upgrading contao/listing-bundle (4.4.40 => 4.4.57)
[39.2MiB/21.17s] - Upgrading contao/manager-bundle (4.4.40 => 4.4.57)
[39.2MiB/21.17s] - Upgrading contao/manager-plugin (2.7.0 => 2.12.0)
[39.2MiB/21.17s] - Upgrading contao/news-bundle (4.4.40 => 4.4.57)
[39.2MiB/21.18s] - Upgrading contao/newsletter-bundle (4.4.40 => 4.4.57)
[39.2MiB/21.18s] - Upgrading doctrine/annotations (v1.6.1 => 1.13.3)
[39.2MiB/21.18s] - Upgrading doctrine/cache (v1.8.0 => 1.13.0)
[39.2MiB/21.18s] - Upgrading doctrine/collections (v1.6.1 => 1.8.0)
[39.2MiB/21.18s] - Upgrading doctrine/common (v2.10.0 => 2.13.3)
[39.2MiB/21.18s] - Upgrading doctrine/dbal (v2.8.1 => 2.13.9)
[39.2MiB/21.18s] - Locking doctrine/deprecations (v1.0.0)
[39.2MiB/21.18s] - Upgrading doctrine/doctrine-bundle (1.11.2 => 1.12.13)
[39.2MiB/21.18s] - Upgrading doctrine/doctrine-cache-bundle (1.3.5 => 1.4.0)
[39.2MiB/21.18s] - Upgrading doctrine/event-manager (v1.0.0 => 1.2.0)
[39.2MiB/21.18s] - Upgrading doctrine/inflector (v1.3.0 => 1.4.4)
[39.2MiB/21.19s] - Upgrading doctrine/lexer (v1.0.1 => 1.2.3)
[39.2MiB/21.19s] - Upgrading doctrine/persistence (1.1.1 => 1.3.8)
[39.2MiB/21.19s] - Upgrading doctrine/reflection (v1.0.0 => 1.2.3)
[39.2MiB/21.19s] - Upgrading fig/link-util (1.0.0 => 1.1.2)
[39.2MiB/21.19s] - Upgrading friendsofsymfony/http-cache (2.7.0 => 2.12.1)
[39.2MiB/21.19s] - Upgrading friendsofsymfony/http-cache-bundle (2.6.1 => 2.11.2)
[39.2MiB/21.19s] - Upgrading guzzlehttp/guzzle (6.3.3 => 6.5.8)
[39.2MiB/21.19s] - Upgrading guzzlehttp/promises (v1.3.1 => 1.5.2)
[39.2MiB/21.19s] - Upgrading guzzlehttp/psr7 (1.5.2 => 1.9.0)
[39.2MiB/21.19s] - Upgrading imagine/imagine (1.2.1 => 1.3.2)
[39.2MiB/21.19s] - Upgrading knplabs/knp-menu (2.3.0 => 2.6.1)
[39.2MiB/21.19s] - Upgrading knplabs/knp-menu-bundle (v2.2.1 => v2.3.0)
[39.2MiB/21.20s] - Upgrading knplabs/knp-time-bundle (v1.9.1 => v1.10.0)
[39.2MiB/21.20s] - Upgrading magmell-agentur/contao-boxes (v2.2.2 => 2.2.3)
[39.2MiB/21.20s] - Upgrading matthiasmullie/minify (1.3.61 => 1.3.69)
[39.2MiB/21.20s] - Upgrading matthiasmullie/path-converter (1.1.2 => 1.1.3)
[39.2MiB/21.20s] - Upgrading menatwork/contao-multicolumnwizard-bundle (3.4.1 => 3.4.11)
[39.2MiB/21.20s] - Upgrading michelf/php-markdown (1.8.0 => 1.9.1)
[39.2MiB/21.20s] - Upgrading monolog/monolog (1.24.0 => 1.27.1)
[39.2MiB/21.20s] - Upgrading nelmio/cors-bundle (1.5.5 => 1.5.6)
[39.2MiB/21.20s] - Upgrading nelmio/security-bundle (2.7.0 => v2.12.0)
[39.2MiB/21.20s] - Upgrading paragonie/random_compat (v9.99.99 => v9.99.100)
[39.2MiB/21.20s] - Upgrading patchwork/utf8 (v1.3.1 => v1.3.3)
[39.2MiB/21.21s] - Upgrading php-http/client-common (1.9.1 => 1.11.0)
[39.2MiB/21.21s] - Upgrading php-http/discovery (1.6.1 => 1.14.3)
[39.2MiB/21.21s] - Upgrading php-http/message (1.7.2 => 1.13.0)
[39.2MiB/21.21s] - Upgrading php-http/promise (v1.0.0 => 1.1.0)
[39.2MiB/21.21s] - Upgrading phpspec/php-diff (v1.1.0 => v1.1.3)
[39.2MiB/21.21s] - Upgrading phpunit/php-token-stream (3.0.1 => 3.1.3)
[39.2MiB/21.21s] - Upgrading psr/container (1.0.0 => 1.1.2)
[39.2MiB/21.21s] - Upgrading psr/log (1.1.0 => 1.1.4)
[39.2MiB/21.21s] - Upgrading ralouphie/getallheaders (2.0.5 => 3.0.3)
[39.2MiB/21.22s] - Locking scssphp/scssphp (v1.11.0)
[39.2MiB/21.22s] - Upgrading sensio/distribution-bundle (v5.0.24 => v5.0.25)
[39.2MiB/21.22s] - Upgrading sensiolabs/security-checker (v5.0.3 => v6.0.3)
[39.2MiB/21.22s] - Upgrading simplepie/simplepie (1.5.2 => 1.7.0)
[39.2MiB/21.22s] - Locking symfony/deprecation-contracts (v2.5.2)
[39.2MiB/21.22s] - Locking symfony/http-client (v5.4.14)
[39.2MiB/21.22s] - Locking symfony/http-client-contracts (v2.5.2)
[39.2MiB/21.22s] - Locking symfony/mime (v5.4.13)
[39.2MiB/21.22s] - Upgrading symfony/monolog-bundle (v3.3.1 => v3.6.0)
[39.2MiB/21.22s] - Upgrading symfony/polyfill-apcu (v1.11.0 => v1.26.0)
[39.2MiB/21.22s] - Upgrading symfony/polyfill-ctype (v1.11.0 => v1.26.0)
[39.2MiB/21.22s] - Upgrading symfony/polyfill-intl-icu (v1.11.0 => v1.26.0)
[39.2MiB/21.22s] - Locking symfony/polyfill-intl-idn (v1.26.0)
[39.2MiB/21.22s] - Locking symfony/polyfill-intl-normalizer (v1.26.0)
[39.2MiB/21.22s] - Upgrading symfony/polyfill-mbstring (v1.11.0 => v1.26.0)
[39.2MiB/21.23s] - Upgrading symfony/polyfill-php56 (v1.11.0 => v1.20.0)
[39.2MiB/21.23s] - Upgrading symfony/polyfill-php70 (v1.11.0 => v1.20.0)
[39.2MiB/21.23s] - Locking symfony/polyfill-php72 (v1.26.0)
[39.2MiB/21.23s] - Locking symfony/polyfill-php73 (v1.26.0)
[39.2MiB/21.23s] - Locking symfony/polyfill-php80 (v1.26.0)
[39.2MiB/21.23s] - Locking symfony/service-contracts (v2.5.2)
[39.2MiB/21.23s] - Upgrading symfony/symfony (v3.4.28 => v3.4.49)
[39.2MiB/21.23s] - Upgrading tecnickcom/tcpdf (6.2.26 => 6.5.0)
[39.2MiB/21.23s] - Upgrading terminal42/contao-changelanguage (3.1.11 => 3.1.17)
[39.2MiB/21.23s] - Locking toflar/psr6-symfony-http-cache-store (2.3.1)
[39.2MiB/21.23s] - Upgrading twig/twig (v1.42.1 => v1.44.7)
[39.2MiB/21.23s] - Upgrading ua-parser/uap-php (v3.8.8 => v3.9.14)
[39.2MiB/21.23s] - Upgrading webmozart/assert (1.4.0 => 1.11.0)
[38.9MiB/21.25s] Writing lock file
[17.1MiB/21.27s] 1 package suggestions were added by new dependencies, use `composer suggest` to see details.
[17.5MiB/21.27s] Package contao-components/compass is abandoned, you should avoid using it. No replacement was suggested.
[17.5MiB/21.28s] Package contao-components/html5shiv is abandoned, you should avoid using it. No replacement was suggested.
[17.5MiB/21.28s] Package contao-components/respimage is abandoned, you should avoid using it. No replacement was suggested.
[17.5MiB/21.28s] Package doctrine/doctrine-cache-bundle is abandoned, you should avoid using it. No replacement was suggested.
[17.5MiB/21.28s] Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
[17.5MiB/21.29s] Package oyejorge/less.php is abandoned, you should avoid using it. No replacement was suggested.
[17.5MiB/21.29s] Package patchwork/utf8 is abandoned, you should avoid using it. Use symfony/polyfill-mbstring or symfony/string instead.
[17.5MiB/21.29s] Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
[17.5MiB/21.29s] Package sensio/distribution-bundle is abandoned, you should avoid using it. No replacement was suggested.
[17.5MiB/21.29s] Package sensiolabs/security-checker is abandoned, you should avoid using it. Use https://github.com/fabpot/local-php-security-checker instead.
[17.5MiB/21.29s] Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
[17.5MiB/21.29s] Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
[17.5MiB/21.29s] Package terminal42/header-replay-bundle is abandoned, you should avoid using it. No replacement was suggested.
[17.5MiB/21.29s] Package true/punycode is abandoned, you should avoid using it. No replacement was suggested.
[17.5MiB/21.29s] Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
[17.7MiB/21.46s] No security vulnerability advisories found
[18.0MiB/21.46s] Memory usage: 17.99MB (peak: 292.96MB), time: 21.47s.
[18.0MiB/21.46s] Finished Composer Cloud resolving.
# Job ID XXX completed in 25 seconds
# Memory usage: 17.99MB (peak: 292.96MB), time: 21.47s.
"/kundenpfad/upgrade/system/modules/haste" is not a link
to "/kundenpfad/upgrade/vendor/codefog/contao-haste" (e
xpected "/kundenpfad/upgrade/vendor/codefog/contao-haste
" but got "/kundenpfad/upgrade/system/modules/haste")
Nach diesem Composer Update war die Installation komplett zerschossen (HTTP 500). Ich hätte im Manager "reparieren" wählen können, aber ich habe mich dann entschieden, einfach assets, vendor, composer.lock, composer.json wiederherzustellen, damit es erstmal wieder läuft.
Ich könnte jetzt die Symlinks einfach vor dem Update korrigieren oder einfach direkt löschen, aber ich dachte, eh ich hier 10x rumprobiere und im Live-System ständig Fehler produziere, frage ich die Profis.
Fragen:
Reicht mein Backup?
Welche Möglichkeiten gibts um das Upgrade zu testen ohne das Live-System zu stören? Docker? Kopie neues Verzeichnis+Subdomain auf Server?
Brauche ich contao-components/installer oder ist "manually removed" ok?
Wie kriegt man raus ob irgendwas "custom" installiert ist? Themes oder modules?
Werden die 3 Packages(contao-boxes, multicolumnwizard, changelanguage) Probleme machen?
Ist es korrekt erst Composer Update zu machen? Oder welchen Knopf drück ich in welcher Reihenfolge im Frontend?
Soll ich erst die Minor auf 4.4.max upgraden, dann direkt auf 4.13, oder Zwischenschritte 4.9 o.ä.? Oder direkt Neuinstallation?
Fallen euch noch spontan Probleme am Dateisystem o.ä. auf?
Danke!
Ich hoffe, ihr könnt mir zumindest ein paar Fragen beantworten!
16.10.2022, 07:49
Birden
Ich würde es in neuem Verzeichnis mit Subdomain machen.
Und zwar wie ein Umzug, das bedeutet nur die notwendigen Dateien kopieren, das sind in der Regel:
Wenn das Verzeichnis “config“ nicht existiert es erstellen und dort die parameters.yml und ggf. config.yml reinpacken. Es kann sein, daß diese Dateien noch unter /app/config/ oder app/Resources/contao/ liegen.
Nun das Verzeichnis /public anlegen, in das die Domain (Supdomin) verlinkt wird. In dieses Verzeichnis kommt der "aktuelle" Contao Manager (https://contao.org/de/download.html)
Noch eine neue Datenbank mit der Kopie der DB anlegen und die oben erwähnte parameters.yml mit den zugangsdaten der DB anpassen.
Das ganze am besten gleich mit PHP 8 machen (ob man PHP 8 auf Ionos erst aktivieren muß weiß ich nicht), dazu muß die composer.json anpassen (man kann die Zeile auch ganz entfern)
Code:
"php": "^8.0",
Jetzt den Contao Manager aufrufen.
Sollte das klappen, muß danach in der Seitenstruktur im Backend noch der Domainname angepaßt werden.
17.10.2022, 04:25
na-oma
Danke dir! Das ist wohl das einfachste.
Du meinst folgendes:
-o.g. Dateien aus der alten Installation + alte DB in eine neue Subdomain umziehen (mit neuer DB+DB-Import)
-DB Daten anpassen etc.
-dann wird per contao-manager ein install o.ä. ausgeführt
-schauen ob es klappt
-dann ggf im manager contao-version upgraden, falls das noch nicht die aktuelle ist.
Korrekt?
Ich habe grad mal eine neue Testinstallation in einer subdomain mit PHP 8.1 aufgesetzt, um erstmal "reinzukommen". Lief alles problemlos. Quasi muss ich nur noch vorher o.g. alte Files reinkopieren+DB importieren+DB Daten anpassen?!
Macht es Sinn sofort auf 5.0 zu gehen oder gibts da Inkompatibilitäten?
Gibts einen dedizierten Upgrade-Guide zwischen den Versionen? Kenne nur das Changelog, das ist aber lang^^
Edit: Ich habe in meiner Testinstallation die alten installierten Packages mal versucht zu installieren:
-magmell-agentur/contao-boxes kann kein PHP8 :(
-MultiColumnWizard finde ich garnicht in der Suche :(
-ChangeLanguage: geht nach DB-Upgrades
Kann man rausfinden, ob die alte Seite tatsächlich die Erweiterungen nutzt, oder ob es Altlasten sind?
Werde es trotzdem mal so versuchen und schauen was rauskommt.
17.10.2022, 07:03
jscholtysik
Zitat:
Zitat von na-oma
Gibts einen dedizierten Upgrade-Guide zwischen den Versionen? Kenne nur das Changelog, das ist aber lang^^
Quasi muss ich nur noch vorher o.g. alte Files reinkopieren+DB importieren+DB Daten anpassen?!
Den Ordner templates musst Du auch kopieren, wenn angepasste Templates vorhanden sind und diese ggf. an die neue Version anpassen.
Zitat:
Zitat von na-oma
Macht es Sinn sofort auf 5.0 zu gehen oder gibts da Inkompatibilitäten?
Für ein produktives System m.E. eher noch nicht, weil doch noch eine Menge Erweiterungen inkompatibel sind.
Zum Testen und melden von Fehlern, damit die Erweiterungen kompatibel gemacht werden können lohnt sich das aber auf jeden Fall.
Zitat:
Zitat von na-oma
Edit: Ich habe in meiner Testinstallation die alten installierten Packages mal versucht zu installieren:
-magmell-agentur/contao-boxes kann kein PHP8 :(
-MultiColumnWizard finde ich garnicht in der Suche :(
-ChangeLanguage: geht nach DB-Upgrades
Kann man rausfinden, ob die alte Seite tatsächlich die Erweiterungen nutzt, oder ob es Altlasten sind?
Wenn eine Version nicht kompatibel ist mit der Contao-Version und/oder PHP-Version, kann man bei der Erweiterung ein Issue aufmachen oder einen Pull-Request einreichen und warten, bis es erledigt wird oder man kann die Anpassung direkt in Auftrag geben. Alternativ verzichtet man auf die Erweiterung ganz oder sucht sich eine Alternative.
MultiColumnWizard solltest Du einzeln nicht benötigen. Das ist eine abhängige Erweiterung, die von einer anderen Erweiterung angefordert wird.
Ob eine Erweiterung wirklich im Einsatz ist merkt man meist im Frontend oder Backend. Am besten schauen was die Erweiterung grundsätzlich für eine Funktion hat.
18.10.2022, 22:28
na-oma
Danke vorneweg!
Ich bin ein paar Schritte weiter. :cool:
Dennoch ist das wie verhext. Fragen in Fett.
Vorgehen:
DB in neue DB duplizieren
/public anlegen
Duplizieren Dateien:
/config (existiert nicht)
/files
/templates
composer.json
composer.lock
/config angelegt
/app/config/parameters.yml nach /config dupliziert
config.yml (existiert nicht)
/system/modules, da sind 2 module drin: changelanguage und haste, diese aber ignoriert Korrekt?
/system/config: localconfig.php und tcpdp.php nach /system/config/ dupliziert Korrekt?
/contao/ bzw. /app/Resources/contao/ nicht existent
DB Connection in parameters.yml angepasst
php version in composer.json auf "^5.6 || ^7.0" gelassen, da die eine extension mit 8.0 wahrscheinlich nicht mehr geht
"public-dir": "web" aus composer.json gelöscht Korrekt?
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- contao-community-alliance/composer-plugin is locked to version 3.0.9 and an update of this package was not requested.
- contao-community-alliance/composer-plugin 3.0.9 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.2.0] but it does not match the constraint.
Problem 2
- contao-components/installer is locked to version 1.3.1 and an update of this package was not requested.
- contao-components/installer 1.3.1 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.2.0] but it does not match the constraint.
Problem 3
- contao/manager-plugin is locked to version 2.7.0 and an update of this package was not requested.
- contao/manager-plugin 2.7.0 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.2.0] but it does not match the constraint.
Problem 4
- contao-community-alliance/composer-plugin 3.0.9 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.2.0] but it does not match the constraint.
- terminal42/contao-changelanguage 3.1.11 requires contao-community-alliance/composer-plugin ^2.4.1 || ~3.0 -> satisfiable by contao-community-alliance/composer-plugin[3.0.9].
- terminal42/contao-changelanguage is locked to version 3.1.11 and an update of this package was not requested.
# Process terminated with exit code 2
# Result: Misuse of shell builtins
Dann komplettes composer update über safe mode
Lief gut bis auf
Code:
Class Contao\ManagerPlugin\PluginLoader located in ./vendor/contao/manager-plugin/src/Resources/PluginLoader.php does not comply with psr-4 autoloading standard. Skipping.
08:48:40 ERROR [console] Error thrown while running command "contao:install --env=prod". Message: "The path "system/config/tcpdf.php" exists and is not a symlink." ["exception" => LogicException { …},"command" => "contao:install --env=prod","message" => "The path "system/config/tcpdf.php" exists and is not a symlink."]
# Process terminated with exit code 1
# Result: General error
Ich habe dann tcpdf.php gelöscht und ein erneutes update gemacht. Korrekt?
Dies lief auch durch.
Wohlgemerkt konnte ich zu dem Zeitpunkt weder Installtool noch Webseite aufrufen, da alles noch in /web liegt.
Ich habe mich dann mit einer Kombination aus einzelnen Extension-Updates, Löschen der MultiColumnWizard-Extension und schrittweisen Contao-Updates 4.4->4.9->4.13 auf die 4.13 gearbeitet.
Zwischendurch immer mal wieder @php vendor/bin/contao-setup Fehler, daher immer wieder "post-install-cmd" auf "Contao\\ManagerBundle\\Composer\\ScriptHandler::i nitializeApplication" gesetzt.
Das Manager-Interne Installtool/Migrations hat aber gefunzt.
Oberflächlich geht die Seite.
Insgesamt erscheint mir das alles etwas wacklig. Zu viele Fehler zwischendurch. Auch sind im /web Verzeichnis noch viele Reste?!
Aktueller Stand/Fragen:
Ein Logo geht nicht, da der Pfad im HTML auf https://dev.example.com/tl_files/kundenname/images/template/logo.gif lautet.
Kann entweder in der DB den Pfad fixen, oder wieder einen symmlink von /tl_files auf /files machen?
https://dev.example.com/cron.php steht im html aber gibt es weder in /web noch in /public?!
https://dev.example.com/assets/mediaelement/js/mediaelement-and-player.min.js steht im html aber gibt es nirgends.
Alle nicht gefundenen Ressourcen leiten auf https://dev.example.com/home.html weiter?!
Da ist eine custom js Datei in https://dev.example.com/files/kundenname/script/kundenname.js Die wird gefunden, aber gehört die da hin?
Die nutzt JQuery, und JQueryTools (ebenfalls aus /files) aber so richtig funzt das nicht, wegen der anderen JS Probleme.
favicon.ico fehlt ;), da dieses natürlich im /web lag, nicht irgendwo in den files oder templates. Wo gehört das eigentlich hin?
Zitat:
Zitat von Birden
Sollte das klappen, muß danach in der Seitenstruktur im Backend noch der Domainname angepaßt werden.
Meinst du damit "Domainname" bei "URL-Einstellungen" bei den Startpunkten? Die sind aktuell leer, reicht das?