@Kahmoon benutze den Debug-Modus und poste den Stack Trace.
@Kahmoon benutze den Debug-Modus und poste den Stack Trace.
Geändert von Spooky (31.08.2020 um 17:14 Uhr)
Darf ich das Thema nochmals aufwärmen? Ich habe eine Website, die ich nicht von 4.8.* auf 4.9.* umstellen kann, die anderen gingen problemlos. Die 4.9-Installation endet mit einem OK, ich kann auch die Datenbank aktualisieren. Contao-Manager und Installtool laufen auch. Ich leere jeweils auch alle Caches. Aber Frontend und Backend zeigen das Layout nicht an, Links und Bilder funktionieren nicht. Hat jemand eine Idee, woran das liegen könnte?
Da die Seite nicht live ist, kann ich sie im Moment in dem üblen Zustand belassen. Rufe ich direkt die Domain auf, wird die URL verstümmelt: https://.index.php. An der .htaccess kann es nicht liegen, denn die hat unter der Version 4.8 genauso funktioniert.
Eine Unterseite kann ich aber aufrufen: https://test.zmaag.ch/projekte.html
Die Browserkonsole meldet diverse Fehler, mit denen ich leider nicht viel anfangen kann.
Kann es sein, dass trotz der Erfolgsmeldung beim Update-Prozess etwas schiefgelaufen ist? Hier die Konsolenausgabe des Updates:
Könnte es etwas damit zu tun haben, dass die Dateien mit der PHP zip-Extension entpackt wurden statt mit unzip? Bei Contao-Version 4.8.x scheint das kein Problem zu sein.Code:Pakete werden aktualisiert Konsolentask abgeschlossen! Der Hintergrund-Prozess wurde erfolgreich beendet. Prüfen Sie die Konsolenausgabe für weitere Details. Datenbank aktualisieren $ /usr/bin/php -q /var/www/eis96pw/web/contao-manager.phar.php composer require contao/manager-bundle=4.9.* contao/news-bundle=4.9.* contao/calendar-bundle=4.9.* contao/faq-bundle=4.9.* contao/comments-bundle=4.9.* contao/newsletter-bundle=4.9.* contao/listing-bundle=4.9.* --no-suggest --no-update --no-scripts --prefer-stable --sort-packages --no-ansi --no-interaction /var/www/eis96pw/composer.json has been updated # Process terminated with exit code 0 # Result: OK $ /usr/bin/php -q /var/www/eis96pw/web/contao-manager.phar.php composer remove contao/core-bundle contao/installation-bundle --no-update --no-scripts --no-ansi --no-interaction contao/core-bundle is not required in your composer.json and has not been removed contao/installation-bundle is not required in your composer.json and has not been removed # Process terminated with exit code 0 # Result: OK > Resolving dependencies using Composer Cloud v2.4.3 # Job ID Ewom69gWglq3KpVuKVUGgM40Uf4wD5tqosQoMEQXELpyRGc3rxNRnb27b4NS3X5MbpVY3CdOIDIXL31b1BdXXbJcgkmGnRzGNrKOZUog4cwjpKLZ2qIctpENcNqRJ completed in 45 seconds # Memory usage: 461.88MB (peak: 2220.67MB), time: 42.91s. $ /usr/bin/php -q /var/www/eis96pw/web/contao-manager.phar.php composer install --prefer-dist --no-dev --no-progress --no-suggest --no-ansi --no-interaction --optimize-autoloader composer/package-versions-deprecated: Generating version class... composer/package-versions-deprecated: ...done generating version class contao/manager-plugin: Generating plugin class... contao/manager-plugin: ...done generating plugin class Added the web/app.php file. Added the web/index.php file. Added the web/preview.php file. // 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 [OK] Cache for the "prod" environment (debug=false) was successfully warmed. Trying to install assets as relative symbolic links. --- -------------------------------- ------------------ Bundle Method / Error --- -------------------------------- ------------------ ? ContaoCoreBundle relative symlink ? MarkocupicGalleryCreatorBundle relative symlink ? ContaoFaqBundle relative symlink ? ContaoCommentsBundle relative symlink ? ContaoNewsBundle relative symlink ? ContaoCalendarBundle relative symlink ? ContaoNewsletterBundle relative symlink --- -------------------------------- ------------------ [OK] All assets were successfully installed. --- ---------------------------------- ---------------------------------------------------------------- Symlink Target / Error --- ---------------------------------- ---------------------------------------------------------------- ? web/files/downloads files/downloads ? web/files/gallery_creator_albums files/gallery_creator_albums ? web/files/zmaag files/zmaag ? web/files/bilder files/bilder ? system/themes/flexible vendor/contao/core-bundle/src/Resources/contao/themes/flexible ? web/assets assets ? web/system/themes system/themes ? system/logs var/logs --- ---------------------------------- ---------------------------------------------------------------- Done! Please open the Contao install tool or run contao:migrate on the command line to make sure the database is up-to-date. Loading composer repositories with package information Installing dependencies from lock file Package operations: 15 installs, 52 updates, 10 removals - Removing symfony/inflector (v5.1.4) - Removing sensiolabs/ansi-to-html (v1.2.0) - Removing ralouphie/getallheaders (3.0.3) - Removing oyejorge/less.php (v1.7.0.14) - Removing league/uri-manipulations (1.5.0) - Removing league/uri (5.3.0) - Removing guzzlehttp/psr7 (1.6.1) - Removing guzzlehttp/promises (v1.3.1) - Removing guzzlehttp/guzzle (6.5.5) - Removing php-http/guzzle6-adapter (v1.1.1) - Updating composer/package-versions-deprecated (1.5.1 => 1.11.99): As there is no 'unzip' command installed zip files are being unpacked using the PHP zip extension. This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost. Installing 'unzip' may remediate them. Downloading (100%) - Updating symfony/yaml (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/mime (v4.4.12 => v5.1.4): Downloading (100%) - Updating symfony/http-foundation (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/event-dispatcher (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/var-dumper (v4.3.11 => v4.4.12): Downloading (100%) - Installing symfony/error-handler (v4.4.12): Downloading (100%) - Updating symfony/http-kernel (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/service-contracts (v1.1.9 => v2.1.3): Downloading (100%) - Updating symfony/dependency-injection (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/filesystem (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/config (v4.3.11 => v4.4.12): Downloading (100%) - Installing symfony/http-client-contracts (v2.1.3): Downloading (100%) - Installing symfony/http-client (v4.4.12): Downloading (100%) - Installing psr/http-factory (1.0.1): Downloading (100%) - Installing psr/http-client (1.0.1): Downloading (100%) - Updating php-http/httplug (v1.1.0 => 2.2.0): Downloading (100%) - Updating php-http/client-common (1.10.0 => 2.3.0): Downloading (100%) - Installing wikimedia/less.php (1.8.2): Downloading (100%) - Installing webignition/disallowed-character-terminated-string (2.0): Downloading (100%) - Installing webignition/robots-txt-file (3.0): Downloading (100%) - Installing symfony/dom-crawler (v4.4.12): Downloading (100%) - Installing nyholm/psr7 (1.3.0): Downloading (100%) - Installing terminal42/escargot (0.6.1): Downloading (100%) - Updating symfony/translation-contracts (v1.1.9 => v2.1.3): Downloading (100%) - Updating symfony/twig-bundle (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/translation (v4.3.11 => v4.4.12): Downloading (100%) - Installing symfony/property-info (v5.1.4): Downloading (100%) - Updating symfony/property-access (v4.4.12 => v5.1.4): Downloading (100%) - Updating symfony/security-http (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/security-guard (v4.4.0 => v4.4.12): Downloading (100%) - Updating symfony/security-csrf (v4.4.12 => v5.1.4): Downloading (100%) - Updating symfony/security-bundle (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/routing (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/process (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/monolog-bridge (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/lock (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/finder (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/var-exporter (v4.4.12 => v5.1.4): Downloading (100%) - Updating symfony/cache-contracts (v1.1.9 => v2.1.3): Downloading (100%) - Updating symfony/cache (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/framework-bundle (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/expression-language (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/console (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/asset (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony-cmf/routing (2.2.0 => 2.3.2): Downloading (100%) - Updating symfony-cmf/routing-bundle (2.3.0 => 2.4.0): Downloading (100%) - Installing ramsey/uuid (3.9.3): Downloading (100%) - Updating nelmio/cors-bundle (1.5.6 => 2.1.0): Downloading (100%) - Updating knplabs/knp-menu (2.6.0 => v3.1.2): Downloading (100%) - Updating knplabs/knp-menu-bundle (v2.3.0 => v3.0.0): Downloading (100%) - Installing dragonmantank/cron-expression (v2.3.0): Downloading (100%) - Updating contao/imagine-svg (0.2.3 => 1.0.1): Downloading (100%) - Updating contao/core-bundle (4.8.8 => 4.9.5): Downloading (100%) - Updating contao/calendar-bundle (4.8.8 => 4.9.5): Downloading (100%) - Updating contao/comments-bundle (4.8.8 => 4.9.5): Downloading (100%) - Updating contao/faq-bundle (4.8.8 => 4.9.5): Downloading (100%) - Updating contao/listing-bundle (4.8.8 => 4.9.5): Downloading (100%) - Updating symfony/web-profiler-bundle (v4.3.11 => v4.4.12): Downloading (100%) - Installing symfony/stopwatch (v4.4.12): Downloading (100%) - Updating symfony/proxy-manager-bridge (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/dotenv (v4.3.11 => v4.4.12): Downloading (100%) - Updating symfony/debug-bundle (v4.3.11 => v4.4.12): Downloading (100%) - Updating contao/installation-bundle (4.8.8 => 4.9.5): Downloading (100%) - Updating contao/manager-bundle (4.8.8 => 4.9.5): Downloading (100%) - Updating contao/news-bundle (4.8.8 => 4.9.5): Downloading (100%) - Updating contao/newsletter-bundle (4.8.8 => 4.9.5): Downloading (100%) Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead. Generating optimized autoload files Deprecation Notice: Class League\Uri\Schemes\AbstractUri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/eis96pw/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class League\Uri\Schemes\Data located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/eis96pw/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class League\Uri\Schemes\File located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/eis96pw/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class League\Uri\Schemes\Ftp located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/eis96pw/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class League\Uri\Schemes\Http located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/eis96pw/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class League\Uri\Schemes\Uri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/eis96pw/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class League\Uri\Schemes\UriException located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/eis96pw/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class League\Uri\Schemes\Ws located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/eis96pw/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201 75 packages you are using are looking for funding. Use the `composer fund` command to find out more! > Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication # Process terminated with exit code 0 # Result: OK --- ### Prozess erfolgreich abgeschlossen ###
Was ich noch vergessen habe zu erwähnen: Neben dem Contao-Paket nutze ich nur noch das Gallery Creator-Bundle.
Geändert von Marion (31.08.2020 um 17:15 Uhr) Grund: Ergänzende Info
Dein <base href> ist kaputt. Verwendest du ein angepasstes fe_page Template?
Wo finde ich das, zu Reparaturzwecken?
Im Backend hast du einen Button zum vergleichen des Templates.
Dann muss ich erst wieder downgraden? Im Backend mit 4.9 funktioniert ja nix mehr...
Achso, auch im Backend ist der <base href> kaputt. Welche Anpassungen hast du an der Contao Installation generell vorgenommen?
Aus deinen vergangenen Threads/Posts geht hervor, dass sich die Contao Installation hinter einem Reverse Proxy befindet. Ist das immer noch der Fall? Habt ihr den Proxy korrekt konfiguriert? Habt ihr den Proxy in die TRUSTED_PROXIES Umgebungsvariable für die Contao Instanz eingetragen?
Ich habe nichts geändert zwischen der 4.8- und der 4.9-Version.
Mir fällt auf, dass im letzten Backup unter system/config 17 Dateien waren. Nach dem Update habe ich nur noch ein localconfig.php und ein localconfig.php.save. Braucht es die anderen Dateien in 4.9 nicht mehr? Oder befinden sie sich woanders? Oder ist das die Ursache meines Problems?
Zumindest für Letzteres musst du das nicht machen. Lege im Live System in deiner Contao Installation im Root Verzeichnis eine Datei namens ".env" an und eine zweite Datei namens ".env.local". In die Zweite Datei trägst du folgendes ein:<PROXY-IPS> ersetzt du mit einer komma-separierten Liste an Proxy IPs (oder auch nur eine einzelne IP). Ggf. musst du natürlich trotzdem den Hoster kontaktieren um die korrekte IP des Reverse Proxies zu erfahren.Code:TRUSTED_PROXIES=<PROXY-IPS>
Du kannst auch nur die ".env" Datei benutzen, das kommt auf eure Versionierungsstrategie an.
- - - Aktualisiert - - -
Die Frage war, welche Anpassungen du an der Contao Installation vorgenommen hast. Ungeachtet der Version und des Updates.
Nur damit ich das richtig mache: Du meinst nicht das Verzeichnis "web", sondern das darüber, in dem auch das Verzeichnis vom Contao-Manager drin ist?
Und die .env bleibt leer?
Sorry, ich stehe immer noch auf dem Schlauch. Ich habe alle möglichen Anpassungen gemacht, Inhalt, Seitentemplates, Systemeinstellungen, bei "css" hab ich alles gelöscht und in externe Stylesheets übertragen, aber das meinst du ja wahrscheinlich nicht?
Geändert von Marion (31.08.2020 um 18:02 Uhr)
Das einzige Template, das ich angepasst habe, ist das vom Gallery Creator:
HTML-Code:<?php /* CSS for the frontend-output */ $GLOBALS['TL_CSS'][] = 'bundles/markocupicgallerycreator/css/gallery_creator_fe.css'; ?> <?php if (!\Input::get('items')): ?> <!-- gallery_creator - album list --> <div class="<?= $this->class ?> gallery_creator block"<?= $this->cssID ?><?php if ($this->style): ?> style="<?= $this->style ?>"<?php endif; ?>> <?php if ($this->headline): ?><<?= $this->hl ?>><?= $this->headline ?></<?= $this->hl ?>><?php endif; ?> <?= $this->pagination ?> <?php if (count($this->arrAlbums) > 0): ?> <ul class="list_albums"> <?php foreach ($this->arrAlbums as $Album): ?> <li class="level_1 <?= $Album['cssClass'] ?> clearfix block"<?= $this->imagemargin ? 'style="'.$this->imagemargin.'"' : '' ?>> <div class="tstamp block"> <p>[<?= $Album['event_date'] ?>]</p> </div> <div class="col_1"> <figure class="image_container" onmouseover="<?= $Album['thumbMouseover'] ?>"> <?php if ($Album['href']): ?><a href="<?= $Album['href'] ?>" title="<?= $Album['title'] ?>"><?php endif; ?> <?php $this->insert('picture_default', $Album['picture']); ?> <?php if ($Album['href']): ?></a><?php endif; ?> </figure> </div> <div class="col_2"> <?php if ($Album['href']): ?><a href="<?= $Album['href'] ?>" title="<?= $Album['title'] ?>"><?php endif; ?> <h2><?= $Album['name'] ?></h2> <?php if ($Album['href']): ?></a><?php endif; ?> <?php if ($Album['photographer'] !== ''): ?><p class="photographer"><?= $GLOBALS['TL_LANG']['gallery_creator']['photographerName'] ?>: <?= $Album['photographer'] ?></p><?php endif; ?> <?php if ($Album['count']): ?> <p class="count_pics"><?= $Album['count'] ?> <?= $GLOBALS['TL_LANG']['gallery_creator']['pictures'] ?></p> <p class="visitors"><?= $Album['visitors'] ?> <?= $GLOBALS['TL_LANG']['gallery_creator']['visitors'] ?></p> <?php endif; ?> <?php if ($Album['count_subalbums']): ?> <p class="count_pics"><?= $Album['count_subalbums'] ?> <?= $GLOBALS['TL_LANG']['gallery_creator']['subalbums'] ?></p> <?php endif; ?> <?php if ($Album['comment']): ?><div class="album_comment"><?= $Album['comment'] ?></div><?php endif; ?> </div> </li> <?php endforeach; ?> </ul> <?php endif; ?> </div> <?php endif; ?> <?php if (\Input::get('items')): ?> <!-- gallery_creator - album preview --> <div class="<?= $this->class ?> gallery_creator block"<?= $this->cssID ?><?php if ($this->style): ?> style="<?= $this->style ?>"<?php endif; ?>> <?php if ($this->insertArticlePre):?> <!-- articleBoxPre--> <div id="articleBoxPre" class="block"> <?= $this->insertArticlePre ?> </div> <!-- end articleBoxPre--> <?php endif; ?> <?php if ($this->headline): ?> <<?= $this->hl ?>><?= $this->headline ?></<?= $this->hl ?>> <?php endif; ?> <?php if ($this->Albumname): ?> <h2><?= $this->Albumname ?></h2> <?php endif; ?> <?php if ($this->subalbums): ?> <div class="subalbums"> <h3><?= $GLOBALS['TL_LANG']['gallery_creator']['subalbums_of'] ?>: <?= $this->Albumname ?></h3> <ul class="list_albums"> <?php foreach ($this->subalbums as $Subalbum): ?> <li class="level_1 <?= $Subalbum['cssClass'] ?> clearfix block"<?= $this->imagemargin ? 'style="'.$this->imagemargin.'"' : '' ?>> <div class="tstamp block"><p>[<?= $Subalbum['event_date'] ?>]</p></div> <div class="col_1"> <figure class="image_container" onmouseover="<?= $Subalbum['thumbMouseover'] ?>"> <?php if ($Subalbum['href']): ?> <a href="<?= $Subalbum['href'] ?>" title="<?= $Subalbum['title'] ?>"> <?php endif; ?> <?php $this->insert('picture_default', $Subalbum['picture']); ?> <?php if ($Subalbum['href']): ?> </a> <?php endif; ?> </figure> </div> <div class="col_2"> <h2><?= $Subalbum['name'] ?></h2> <?php if ($Subalbum['count']): ?> <p class="count_pics"><?= $Subalbum['count'] ?> <?= $GLOBALS['TL_LANG']['gallery_creator']['pictures'] ?></p> <p class="visitors"><?= $Subalbum['visitors'] ?> <?= $GLOBALS['TL_LANG']['gallery_creator']['visitors'] ?></p> <?php endif; ?> <?php if ($Subalbum['count_subalbums']): ?> <p class="count_pics"><?= $Subalbum['count_subalbums'] ?> <?= $GLOBALS['TL_LANG']['gallery_creator']['subalbums'] ?></p> <?php endif; ?> <?php if ($Subalbum['comment']): ?> <div class="album_comment"><?= $Subalbum['comment'] ?></div> <?php endif; ?> </div> </li> <?php endforeach; ?> </ul> </div> <?php endif; ?> <?php if ($this->albumComment): ?> <div class="album_comment"> <?= $this->albumComment ?> </div> <?php endif; ?> <?= $this->pagination ?> <?php $col=0; ?> <?php if ($this->arrPictures): ?> <div id="galleryContainer" class="block"> <ul class="album_preview"> <?php foreach ($this->arrPictures as $Picture): ?> <li class="col_<?= $col ?><?= ($col == 0 ? ' col_first' : '') ?><?= ($col == $this->colsPerRow - 1 ? ' col_last' : '') ?>"> <figure<?= (strlen($Picture['cssID']) ? ' id="' . $Picture['cssID'] . '"' : '') ?> class="image_container<?= strlen($Picture['cssClass']) ? ' ' . $Picture['cssClass'] : '' ?>"<?= $this->imagemargin ? ' style="'.$this->imagemargin.'"' : '' ?>> <?php if ($Picture['href']): ?> <a<?php if($Picture['socialMediaSRC'] !== ''):?> socialmedia-embed="true"<?php endif; ?> href="<?= $Picture['href'] ?>" <?= $Picture['lightbox'] ?> title="<?= $Picture['comment'] ? $Picture['comment'] : ($Picture['title'] ? $Picture['title'] : $Picture['filename']) ?>"> <?php endif; ?> <?php $this->insert('picture_default', $Picture['picture']); ?> <?php if ($Picture['href'] != ''): ?> </a> <?php endif; ?> </figure> </li> <?php $col++;?> <?php if ($col == $this->colsPerRow) $col=0; ?> <?php endforeach;?> </ul> </div> <?php endif;?> <?php if ($this->insertArticlePost):?> <!-- articleBoxPre--> <div id="articleBoxPost" class="block"> <?= $this->insertArticlePost ?> </div> <!-- end articleBoxPost--> <?php endif; ?> </div> <?php endif; ?> <?php if($this->gc_fullsize): ?> <?php // Add the colorbox style sheet $GLOBALS['TL_CSS'][] = 'assets/colorbox/css/colorbox.min.css|static'; ?> <script src="<?= $this->asset('js/colorbox.min.js', 'contao-components/colorbox') ?>"></script> <script> jQuery(function($) { $('a[socialmedia-embed]').map(function () { $(this).colorbox({ // Put custom options here loop: false, rel: $(this).attr('data-lightbox'), maxWidth: '80%', iframe: true, maxHeight: '95%', innerWidth: '80%', innerHeight: '70%' }); }); }); </script> <?php endif; ?>
Wenn du kein angepasstes fe_page und be_main Template und auch sonst keine Anpassungen hast, die in das System eingreifen, dann Tippe ich auf auf ein Reverse Proxy Problem.
Gelöst!
Der Provider hat die folgenden Änderungen vorgenommen:
- In der localconfig.php die Zeile $_SERVER['HTTP_HOST'] = '.'; auskommentiert
- In der .htaccess die Zeile ergänzt: SetEnvIf X-Forwarded-Proto https HTTPS=on
Jetzt funktioniert alles.
Trotzdem möchte ich noch die beiden .env-Dateien setzen, in der Hoffnung, dass sie Schwierigkeiten in der Zukunft abwenden. Ich habe vom Provider für den Reverse-Proxy eine interne und eine externe IP bekommen. Muss ich die interne oder die externe IP in die .env.local eintragen? Oder beide?
Ich habe nochmals meine Mails mit dem Provider durchgeschaut. Die Zeile in der localconfig kam anscheinend rein, als der Provider im November versuchte, die Installation zum Laufen zu kriegen. Allerdings hat sie da noch leicht anders gelautet. Dass sie in der vorliegenden Form drin blieb, war wohl ein Fehler.
Die Zeile in der .htaccess hat er im November schon mal gesetzt. Wird die .htaccess denn durch ein Update überschrieben?
Super, dann bin ich jetzt auf der LTS und habe hoffentlich ein Weilchen keine Update-Kämpfe mehr. Und hoffentlich mit den .env-Dateien vorgesorgt, dass auch in Zukunft alles rundläuft.
Vielen Dank Spooky für deine Zeit!
Ich bin auch kein Experte darin - aber du musst ja in Symfony aus gutem Grund die TRUSTED_PROXIES setzen - denn nur dann vertraut auch Symfony den X-Forwarded-… Headers. Mit dieser Anweisung in der .htaccess wird aber jedem X-Forwarded-Proto Header getraut, egal von wo er kommt. Könnte eine potentielle Sicherheitslücke sein, die dir da dein Hoster vorschlägt . Aber wie gesagt, was Reverse Proxies und X-Forwarded Header anbelangt bin ich nicht unbedingt Experte.
OK, das Risiko nehme ich jetzt mal so in Kauf. Falls die Seite gehackt würde, bin ich mit meinen regelmässigen Backups gut aufgestellt fürs Recovery.
Aktive Benutzer in diesem Thema: 2 (Registrierte Benutzer: 0, Gäste: 2)