Skip to content
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

Warning: Undefined variable $type #27

Open
dennisbohn opened this issue Jan 22, 2022 · 5 comments
Open

Warning: Undefined variable $type #27

dennisbohn opened this issue Jan 22, 2022 · 5 comments

Comments

@dennisbohn
Copy link

dennisbohn commented Jan 22, 2022

Hallo,

ich erhalten zurzeit eine Warnung, wenn ich im Debug Modus im Backend einen Artikel öffne, der ein Grid enthält.

image

Es wird versucht, die Variable $type zu ergänzen.

Ich habe aber keine Stelle im Code gefunden, an der die Variable definiert wird.

Das Problem konnte durch das Auskommentieren der Zeile behoben werden.

$type .= " <span class='tl_gray'>".$grid."</span>";

Contao: 4.12.5
PHP: 8.1

Viele Grüße
Dennis

@denniserdmann
Copy link
Contributor

Moin Dennis,

danke für den Hinweis und Nachtrag. Wir behalten das mal im Auge, falls das mit der 4.13 Stable wieder auftaucht.
Hast du das Problem auch mit dem Contao Grid Bundle? https://github.com/erdmannfreunde/contao-grid-bundle/ Das ist der Nachfolger von euf_grid.

@dennisbohn
Copy link
Author

dennisbohn commented Jan 29, 2022

Hallo Dennis,

mir war letzte Woche noch garnicht bewusst, dass es inzwischen eine neue Version gibt. ;) Mit der neuen Version funktioniert alles wunderbar.

Das Problem in bei der alten Erweiterung kommt wohl in Verbindung mit PHP 8 zustande. Die fehlende Variable $type hat in PHP 7 noch eine "Notice" verursacht, die im Debug-Modus ignoriert wurde. In PHP 8 wird daraus eine "Warning", die dann zum Abbruch führt.

@sgn-dev
Copy link

sgn-dev commented Feb 16, 2024

Hi Dennis,

ich habe eben das gleiche Problem bemerkt. Das ganze auf Contao 4.13.37 und unter PHP 8.1. Den Nachfolger Grid-Bundle kann ich leider noch nicht verwenden, da ich aktuell noch auf Contao 4.13 gebunden bin. Gibt es da nochmal eine Chance auf einen Fix?

Danke für eure Mühen...

@denniserdmann
Copy link
Contributor

@sgn-dev Die Version 1.1.3 des contao-grid-bundle unterstützt noch Contao 4.13 (und sogar noch 4.9). Einfach bei der Installation darauf achten, die ^1.1 zu erfordern.

@sgn-dev
Copy link

sgn-dev commented Feb 16, 2024

Mega.. danke für den super schnellen Support. Läuft :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants