Ergebnis 1 bis 6 von 6

Thema: Warning: Undefined array key "right"

  1. #1
    Contao-Fan Avatar von gregor
    Registriert seit
    20.06.2009.
    Ort
    Frankfurt am Main
    Beiträge
    555

    Standard Warning: Undefined array key "right"

    Hallo,

    nach einem Update von Contao 4.9.39 auf 4.13.54 (PHP 8.4) habe ich Probleme mit einem internen StyleSheet.
    Das CSS mit Contao 4.13.54 funktioniert im Frontend auch nicht so korrekt, es gibt Darstellungsprobleme mit Hintergrundbildern und Transparenzen, aber ich vermute das dies mit dem Problem zusammen hängt.

    Im aktivierten Debug-Modus erhalte ich beim Speichern des CSS die unten aufgeführte Meldung als Stack Trace.
    Alles was bei "Right" im CSS mit Werten definiert ist, sieht aber für mich plausibel aus.
    Wo liegt das Problem?

    Vielen Dank für einen Hinweis.

    VG,
    Gregor

    Code:
    ErrorException:
    Warning: Undefined array key "right"
    
      at vendor/contao/core-bundle/src/Resources/contao/classes/StyleSheets.php:358
      at Contao\StyleSheets->compileDefinition(array('id' => 194, 'pid' => 4, 'sorting' => 11136, 'tstamp' => 1509959303, 'selector' => '.ce_form .widget', 'category' => 'Formular', 'comment' => '', 'size' => '', 'width' => '', 'height' => '', 'minwidth' => '', 'minheight' => '', 'maxwidth' => '', 'maxheight' => '', 'positioning' => '', 'trbl' => '', 'position' => '', 'floating' => '', 'clear' => '', 'overflow' => '', 'display' => '', 'alignment' => '1', 'margin' => array('top' => '1', 'unit' => 'rem'), 'padding' => '', 'align' => '', 'verticalalign' => '', 'textalign' => '', 'whitespace' => '', 'background' => '', 'bgcolor' => '', 'bgimage' => '', 'bgposition' => '', 'bgrepeat' => '', 'shadowsize' => '', 'shadowcolor' => '', 'gradientAngle' => '', 'gradientColors' => '', 'border' => '', 'borderwidth' => '', 'borderstyle' => '', 'bordercolor' => '', 'borderradius' => '', 'bordercollapse' => '', 'borderspacing' => '', 'font' => '', 'fontfamily' => '', 'fontsize' => '', 'fontcolor' => '', 'lineheight' => '', 'fontstyle' => '', 'texttransform' => '', 'textindent' => '', 'letterspacing' => '', 'wordspacing' => '', 'list' => '', 'liststyletype' => '', 'liststyleimage' => '', 'own' => null, 'invisible' => '', 'beremark' => '', 'remark_icon' => 'info', 'remark_text' => null), true, array('$lgrey' => 'F5F5F5', '$mgrey' => '888888', '$blue' => '003C77', '$txt' => '202020'), array('id' => 4, 'pid' => 1, 'tstamp' => 1744972082, 'name' => 'screen-all', 'embedImages' => 0, 'cc' => '', 'media' => 'a:1:{i:0;s:3:"all";}', 'mediaQuery' => null, 'vars' => 'a:0:{}'))
         (vendor/contao/core-bundle/src/Resources/contao/classes/StyleSheets.php:188)
      at Contao\StyleSheets->writeStyleSheet(array('id' => 4, 'pid' => 1, 'tstamp' => 1744972082, 'name' => 'screen-all', 'embedImages' => 0, 'cc' => '', 'media' => 'a:1:{i:0;s:3:"all";}', 'mediaQuery' => null, 'vars' => 'a:0:{}'))
         (vendor/contao/core-bundle/src/Resources/contao/classes/StyleSheets.php:64)
      at Contao\StyleSheets->updateStyleSheet('4')
         (vendor/contao/core-bundle/src/Resources/contao/dca/tl_style.php:628)
      at tl_style->updateStyleSheet(object(DC_Table))
         (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:201)
      at Contao\DC_Table->__construct('tl_style', array('tables' => array('tl_theme', 'tl_module', 'tl_style_sheet', 'tl_style', 'tl_layout', 'tl_image_size', 'tl_image_size_item'), 'importTheme' => array('Contao\\Theme', 'importTheme'), 'exportTheme' => array('Contao\\Theme', 'exportTheme'), 'import' => array('Contao\\StyleSheets', 'importStyleSheet'), 'export' => array('Contao\\StyleSheets', 'exportStyleSheet')))
         (vendor/contao/core-bundle/src/Resources/contao/classes/Backend.php:416)
      at Contao\Backend->getBackendModule('themes', null)
         (vendor/contao/core-bundle/src/Resources/contao/controllers/BackendMain.php:168)
      at Contao\BackendMain->run()
         (vendor/contao/core-bundle/src/Controller/BackendController.php:49)
      at Contao\CoreBundle\Controller\BackendController->mainAction()
         (vendor/symfony/http-kernel/HttpKernel.php:163)
      at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
         (vendor/symfony/http-kernel/HttpKernel.php:75)
      at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
         (vendor/symfony/http-kernel/Kernel.php:202)
      at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
         (web/index.php:44)

  2. #2
    Alter Contao-Hase
    Registriert seit
    24.02.2021.
    Beiträge
    1.490
    Partner-ID
    11715
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Zitat Zitat von gregor Beitrag anzeigen
    Hallo,

    nach einem Update von Contao 4.9.39 auf 4.13.54 (PHP 8.4) habe ich Probleme mit einem internen StyleSheet.
    Das CSS mit Contao 4.13.54 funktioniert im Frontend auch nicht so korrekt, es gibt Darstellungsprobleme mit Hintergrundbildern und Transparenzen, aber ich vermute das dies mit dem Problem zusammen hängt.

    Im aktivierten Debug-Modus erhalte ich beim Speichern des CSS die unten aufgeführte Meldung als Stack Trace.
    Alles was bei "Right" im CSS mit Werten definiert ist, sieht aber für mich plausibel aus.
    Wo liegt das Problem?

    Vielen Dank für einen Hinweis.

    VG,
    Gregor

    Code:
    ErrorException:
    Warning: Undefined array key "right"
    
      at vendor/contao/core-bundle/src/Resources/contao/classes/StyleSheets.php:358
      at Contao\StyleSheets->compileDefinition(array('id' => 194, 'pid' => 4, 'sorting' => 11136, 'tstamp' => 1509959303, 'selector' => '.ce_form .widget', 'category' => 'Formular', 'comment' => '', 'size' => '', 'width' => '', 'height' => '', 'minwidth' => '', 'minheight' => '', 'maxwidth' => '', 'maxheight' => '', 'positioning' => '', 'trbl' => '', 'position' => '', 'floating' => '', 'clear' => '', 'overflow' => '', 'display' => '', 'alignment' => '1', 'margin' => array('top' => '1', 'unit' => 'rem'), 'padding' => '', 'align' => '', 'verticalalign' => '', 'textalign' => '', 'whitespace' => '', 'background' => '', 'bgcolor' => '', 'bgimage' => '', 'bgposition' => '', 'bgrepeat' => '', 'shadowsize' => '', 'shadowcolor' => '', 'gradientAngle' => '', 'gradientColors' => '', 'border' => '', 'borderwidth' => '', 'borderstyle' => '', 'bordercolor' => '', 'borderradius' => '', 'bordercollapse' => '', 'borderspacing' => '', 'font' => '', 'fontfamily' => '', 'fontsize' => '', 'fontcolor' => '', 'lineheight' => '', 'fontstyle' => '', 'texttransform' => '', 'textindent' => '', 'letterspacing' => '', 'wordspacing' => '', 'list' => '', 'liststyletype' => '', 'liststyleimage' => '', 'own' => null, 'invisible' => '', 'beremark' => '', 'remark_icon' => 'info', 'remark_text' => null), true, array('$lgrey' => 'F5F5F5', '$mgrey' => '888888', '$blue' => '003C77', '$txt' => '202020'), array('id' => 4, 'pid' => 1, 'tstamp' => 1744972082, 'name' => 'screen-all', 'embedImages' => 0, 'cc' => '', 'media' => 'a:1:{i:0;s:3:"all";}', 'mediaQuery' => null, 'vars' => 'a:0:{}'))
         (vendor/contao/core-bundle/src/Resources/contao/classes/StyleSheets.php:188)
      at Contao\StyleSheets->writeStyleSheet(array('id' => 4, 'pid' => 1, 'tstamp' => 1744972082, 'name' => 'screen-all', 'embedImages' => 0, 'cc' => '', 'media' => 'a:1:{i:0;s:3:"all";}', 'mediaQuery' => null, 'vars' => 'a:0:{}'))
         (vendor/contao/core-bundle/src/Resources/contao/classes/StyleSheets.php:64)
      at Contao\StyleSheets->updateStyleSheet('4')
         (vendor/contao/core-bundle/src/Resources/contao/dca/tl_style.php:628)
      at tl_style->updateStyleSheet(object(DC_Table))
         (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:201)
      at Contao\DC_Table->__construct('tl_style', array('tables' => array('tl_theme', 'tl_module', 'tl_style_sheet', 'tl_style', 'tl_layout', 'tl_image_size', 'tl_image_size_item'), 'importTheme' => array('Contao\\Theme', 'importTheme'), 'exportTheme' => array('Contao\\Theme', 'exportTheme'), 'import' => array('Contao\\StyleSheets', 'importStyleSheet'), 'export' => array('Contao\\StyleSheets', 'exportStyleSheet')))
         (vendor/contao/core-bundle/src/Resources/contao/classes/Backend.php:416)
      at Contao\Backend->getBackendModule('themes', null)
         (vendor/contao/core-bundle/src/Resources/contao/controllers/BackendMain.php:168)
      at Contao\BackendMain->run()
         (vendor/contao/core-bundle/src/Controller/BackendController.php:49)
      at Contao\CoreBundle\Controller\BackendController->mainAction()
         (vendor/symfony/http-kernel/HttpKernel.php:163)
      at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
         (vendor/symfony/http-kernel/HttpKernel.php:75)
      at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
         (vendor/symfony/http-kernel/Kernel.php:202)
      at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
         (web/index.php:44)
    Hey Gregor, ist es ein Bug? Vermutlich.
    Übrigens ist Contao 4.13 nun auch nur noch im Security-Support, da wird es keine Bugfixes mehr geben.

    Mehr findest du im Release-Plan:
    https://contao.org/de/release-plan

    Beachte bitte, dass interne Stylesheets in Contao 5 entfernt wurden und es besser ist diese CSS zu exportieren und im Seitenlayout einzubinden und dann mit eigenen .css Dateien zu arbeiten.

  3. #3
    Contao-Fan Avatar von gregor
    Registriert seit
    20.06.2009.
    Ort
    Frankfurt am Main
    Beiträge
    555

    Standard

    Hallo zoglo,

    die Umstände um 4.13 sind mir bekannt, aber einige bei der Installtion eingesetzten Erweiterungen sind noch nicht für 5.3 verfügbar ...

    Ich gehe nicht davon aus das es ein Bug in 4.13 ist, denn andere interne StyleSheets können ohne Probleme gespeichert werden.
    Nur ein StyleSheet hat dieses Problem.

    VG,
    Gregor

  4. #4
    Alter Contao-Hase
    Registriert seit
    24.02.2021.
    Beiträge
    1.490
    Partner-ID
    11715
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Es ist ja nur ein Warning, welcher im Debug-Modus Auftritt. Du könntest diese mit z.b. error_level: 8181 über die config.yaml unterdrücken

  5. #5
    Contao-Nutzer Avatar von Joern
    Registriert seit
    14.09.2018.
    Beiträge
    139

    Standard

    Hier eine Beschreibung, wie man die Warnings ausschalten kann: Warnings im Debugmodus ausschalten
    Das hat mir letztens auch geholfen.

  6. #6
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    37.191
    Partner-ID
    10107

    Standard

    "Modernere" Variante wäre Error Level 4437.
    » sponsor me via GitHub or Revolut

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •