Code- und Infoschnipsel
Löschen der Sessiontabelle bei großen Dateninhalten
SQL-Query ausführen:
UPDATE tl_user SET `session` = NULL;
Symlink löschen
Hier konnte der Ordner der Erweiterung haste nicht gelöscht werden. Mit dem Aufruf der beiden Befehle wird haste aus dem Cache neu installiert und der Symlink neu angelegt.
rm system/modules/haste
composer update
Quelle: https://community.contao.org/de/showthread.php?68060-Update-wird-nicht-fehlerfrei-ausgef%C3%BChrt
DCA-Anpassungen ab Contao 4:
https://community.contao.org/de/showthread.php?67926-Contao-4-HTML-in-Überschirften-erlauben
Update einer Erweiterung schlägt fehl
Eine Contao 4.4.6 Installation mit Contao Manager wurde ausgeführt und ein Update gestartet. Das Update lief nicht erfolgreich durch. Auch der Aufruf via Konsole brachte den gleichen Fehler.
[RuntimeException]
"/xxx/system/modules/multicolumnwizard" is not a link to "/xxx/vendor/menatwork/contao-multicolumnwizard/system/modules/multicolumnwizard" (expected "/xxx/vendor/menatwork/contao-multicolumnwizard/system/modules/multicolumnwizard" but got "/xxx/system/modules/multicolumnwizard")
Geholfen hat, in den Verzeichnisses „/system/modules/” und „/web/system/modules/” den Ordner der Erweiterung „multicolumnwizard” und im Verzeichnis „/vendor/” den Ordner „/menatwork/” zu löschen.
Anschließend wieder das Composer Update ausführen und die Erweiterung wurde - ohne Fehler - neu installiert.
Im Forum gab es wieder Konsolentipps:
Backend via htaccess schützen
Um das Backend-Login mit einem Passwortschutz zu versehen, kann man Apache so konfigurieren:
AuthUserFile /path/to/.htpasswd
AuthName "Contao Backend Authentification"
AuthType Basic
Require valid-user
SetEnvIf Request_URI "^contao($|/)" contao_backend
Order Allow,Deny
Allow from all
Deny from env=contao_backend
Nur gucken, nicht anfassen oder: Informationen abrufen ohne Aktualisierungen
Will man prüfen, ob es neue Versionen der Bundles oder anderer Komponenten gibt, kann man das auf der Konsole mit diesem Befehl prüfen:
composer update --dry-run
Bei allinkl rufe ich dies dann so auf:
php71 composer.phar update --dry-run
Exemplarisch die Ausgabe in der Konsole:
php71 composer.phar update --dry-run
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 9 installs, 24 updates, 1 removal
- Uninstalling jeremykendall/php-domain-parser (3.0.0)
- Installing ocramius/package-versions (1.2.0)
- Updating twig/twig (v1.35.0) to twig/twig (v2.4.4)
- Installing egulias/email-validator (2.1.3)
- Updating swiftmailer/swiftmailer (v5.4.8) to swiftmailer/swiftmailer (v6.0.2)
- Updating symfony/swiftmailer-bundle (v2.6.7) to symfony/swiftmailer-bundle (v3.1.6)
- Updating sensio/framework-extra-bundle (v3.0.29) to sensio/framework-extra-bundle (v5.1.3)
- Installing league/uri-interfaces (1.0.0)
- Installing league/uri-parser (1.3.0)
- Installing league/uri-schemes (1.1.1)
- Installing league/uri-hostname-parser (1.0.4)
- Installing league/uri-components (1.6.0)
- Installing league/uri-manipulations (1.3.0)
- Updating league/uri (4.2.2) to league/uri (5.2.0)
- Updating leafo/scssphp (v0.6.7) to leafo/scssphp (v0.7.4)
- Updating knplabs/knp-time-bundle (1.7.5) to knplabs/knp-time-bundle (1.8.0)
- Updating knplabs/knp-menu-bundle (v2.2.0) to knplabs/knp-menu-bundle (v2.2.1)
- Updating contao-components/tinymce4 (4.6.7.2) to contao-components/tinymce4 (4.7.4)
- Updating contao-components/mediaelement (4.2.6) to contao-components/mediaelement (4.2.7)
- Updating contao-components/highlight (8.9.1) to contao-components/highlight (9.12.0)
- Updating contao-components/dropzone (4.3.0) to contao-components/dropzone (5.1.1)
- Updating contao-components/ace (1.2.8) to contao-components/ace (1.2.9)
- Installing ausi/slug-generator (v1.0.0)
- Updating contao/core-bundle (4.4.9) to contao/core-bundle (4.5.0)
- Updating contao/calendar-bundle (4.4.9) to contao/calendar-bundle (4.5.0)
- Updating contao/manager-plugin (2.1.1) to contao/manager-plugin (2.2.0)
- Updating contao/installation-bundle (4.4.9) to contao/installation-bundle (4.5.0)
- Updating contao/manager-bundle (4.4.9) to contao/manager-bundle (4.5.0)
- Updating contao/comments-bundle (4.4.9) to contao/comments-bundle (4.5.0)
- Updating contao/faq-bundle (4.4.9) to contao/faq-bundle (4.5.0)
- Updating contao/listing-bundle (4.4.9) to contao/listing-bundle (4.5.0)
- Updating contao/news-bundle (4.4.9) to contao/news-bundle (4.5.0)
- Updating contao/newsletter-bundle (4.4.9) to contao/newsletter-bundle (4.5.0)
- Updating kmielke/calendar_extended (3.7.12) to kmielke/calendar_extended (3.7.13)
Wichtig!
Hier sieht man nun, dass das Update von 4.4.9 auf 4.5.0 ausgeführt würde. Damit verlässt man die LTS-Version.
Hier muss überprüft werden, welche Angabe in den Contao-Bundles eingetragen ist.
Im oben genannten Beispiel stand „^4.4” in allen Contao-Bundles drin, womit dann auch die Version 4.5.0 installiert wird.
Will man das auf die LTS-Versionen beschränken, muss man die Einträge auf „4.4.*” abändern.
Informationen der Nomenklatur findet man hier:
https://getcomposer.org/doc/articles/versions.md#next-significant-release-operators
Abhängigkeiten einer Erweiterung via Konsole abfragen
composer show vendor/package --tree
Quelle: https://community.contao.org/de/showthread.php?64904-Simple-Ajax&p=462898&viewfull=1#post462898
Speicherverbrauch anzeigen lassen
composer update -vv --profile