-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wartungstemplate anpassen in Contao 5.5 #1549
Comments
|
|
Basiert das nicht auf dieser Datei? Um Missverständnisse zu vermeiden: Ich meinte schon das allgemeine Error-Layout-Template, nicht nur speziell "Service unavailable"... Also beispielsweise, um in allen Fehlerseiten ein angepasstes Logo zu haben, CSS-Styles abändern... vor 5.5 hat das wie derzeit in der Anleitung beschrieben funktioniert. Um solche Anpassungen mit Twig-Vererbung machen zu können (ohne das komplette Error-Layout-Template überschreiben zu müssen), wären im Contao-Standard-Error-Layout-Template weitere Blöcke nötig (z.B. innerhalb der < style >-Sektion, am Anfang direkt nach < body >, um das Contao-SVG-Logo...) |
Actually the documentation also mentions adjusting all error templates accordingly. The change was introduced in #7659. @contao/developers the discussed BC layer does not seem to work then - nor can it really work, can it? The new error templates only use the new template namespace, so the old templates can never really have any effect. |
I think the BC layer was incorrectly built. It adds BC if someone rendered the error template manually, instead of adding BC if someone changed the original template. |
I don't understand the issue. The same templates as before are rendered from the code. They just got a new parent template they extend from (the new location). |
@m-vo this is what we have documented:
This does not work anymore since contao/contao#7659. A |
There's no BC promise for templates anyway so why don't we just fix the docs? |
@Toflar because we decided to have the BC layer in order to not make things unnecessarily difficult for users. See
If the BC layer does not work as intended and we do not want to fix this, we can just remove it anyway. |
As discussed in the Contao call we want to try to fix the template inheritance so that this will work in a BC way again. |
The documentation should still be updated. For new installations (5.5+) you would rather adjust the templates directly from the |
Yes 👍 |
Beim Update auf Contao 5.5.2 war mir aufgefallen, dass das angepasste Wartungstemplate (Anleitung Logo ändern) in /templates/bundles/ContaoCoreBundle/Error/layout.html.twig nicht mehr greift.
Im Core hat das Template einen Unterstrich im Dateinamen, aber eine Anpassung des eigenen Templates in /templates/bundles/ContaoCoreBundle/Error/_layout.html.twig (mit Leeren des Prod-Cache) hat das Problem nicht behoben.
Ich nehme an, das kam mit der Einführung des "Template Studio" in Contao 5.5.0?
Mein erster Versuch, im Backend > Template Studio das Template unter "error > error/_layout" komplett zu überschreiben, hat nicht geklappt (hatte den Inhalt des Ausgangstemplate aus Schritt 1 komplett kopiert, dann auf "Create your Template" geklickt, den kopierten Code dort eingefügt und gespeichert -> es wurde danach wieder nur das Standard-Überschreiben-Template angezeigt "@ extends... Adjust how any blocks of parent or used component templates are rendered.")
Ich habe daraufhin in einem externen Editor die Datei /template/error/_layout.html.twig bearbeitet, den kompletten Original-Code dort eingefügt, meine Anpassungen gemacht, gespeichert und danach im Manager den Prod-Cache geleert, das hat dann geklappt und im Template Studio wird nun auch angezeigt "This template overwrites all previously defined content because it does not extend from @ Contao/error/_layout.html.twig".
Ich vermute, das betrifft alle, die ein angepasstes Wartungstemplate verwenden. Vielleicht sollte auch zusätzlich zur Anleitung, wie man das Wartungstemplate anpasst, auch auf der Seite "Update und Migration" ein Hinweis ergänzt werden, dass mit dem Update auf 5.5 Wartungstemplates anders angepasst werden müssen?
The text was updated successfully, but these errors were encountered: