Fehler: Feature Box - Fehlermeldung sobald ein Bild verwendet wird (nach Update)

Lisa's Avatar

Lisa

04 Jun, 2025 12:35 PM

Produkt: Oneo Contao
Contao-Version: 5.5.11
Browser und Browserversionen: diverse getestet

Theme: Oneo
Contao 5.5.11
PHP 8.3

Hallo,
ich habe meiner alten Contao Installation ein Update auf 5.5.11 verpasst. Nun habe ich das Problem, dass der Elementtyp Inhaltselement Feature Box nicht mehr richtig funktioniert. Wenn ich nur Text verwende, gibt es kein Problem. Sobald ich ein Bild hinzufügen möchte, bekomme ich beim Speichern die Fehlermeldung: Internal Server Error - Was ist das Problem? - array_map(): Argument #1 ($callback) must be a valid callback or null, class "StringUtil" not found

Ich habe auch andere Elementtypen getestet. Hier konnte ich diesen Fehler nicht feststellen.

Wo könnte hier das Problem liegen?
Vielen Dank und beste Grüße!

  1. Support Staff 1 Posted by RockSolid Theme... on 04 Jun, 2025 02:02 PM

    RockSolid Themes's Avatar

    Vielen Dank für Ihre Frage.

    Wir konnten den Fehler leider nicht reproduzieren.

    ich habe meiner alten Contao Installation ein Update auf 5.5.11 verpasst.

    Welche Version von Contao wurde vor dem Update eingesetzt und welche Theme-Version wird verwendet?

    Aktivieren Sie bitte den Debug-Modus und senden Sie uns den kompletten Stack Trace der unter der Fehlermeldung angezeigt wird, damit wir Ihnen zielgerichteter weiterhelfen können.

  2. 2 Posted by Lisa on 05 Jun, 2025 10:10 AM

    Lisa's Avatar

    Vielen Dank für die Antwort.

    Ich hatte im Dezember 2024 die aktuelle Theme-Version eingespielt.
    Der Rock Solid Slider ist ebenfalls auf der neusten Version.
    Die Website wurde damals noch mit Contao 3 aufgesetzt und lief zum Schluss unter 4.13.

    Ich konnte herausfinden, dass es wohl ein Problem mit den Templates j_modernizr.html5 und moo_modernizr.html5 gab. Ich hatte den Haken im Seitenlayout noch gesetzt. Die zwei kann ich löschen, oder?

    Nun bekomme ich beim Speichern die Fehlermeldung nicht mehr, sondern ein weißer Screen. Ich kann nach wie vor kein Bild einfügen. Was auch beim Rock Solid Slider so ist.

    Hier der Stack Trace:

    ErrorException:
    Warning: foreach() argument must be of type array|object, null given

      at vendor/madeyourday/contao-rocksolid-slider/src/Module/Slider.php:519
      at MadeYourDay\RockSolidSlider\Module\Slider->parseSlides()
         (vendor/madeyourday/contao-rocksolid-slider/src/Module/Slider.php:244)
      at MadeYourDay\RockSolidSlider\Module\Slider->compile()
         (vendor/contao/core-bundle/contao/modules/Module.php:214)
      at Contao\Module->generate()
         (vendor/madeyourday/contao-rocksolid-slider/src/Module/Slider.php:143)
      at MadeYourDay\RockSolidSlider\Module\Slider->generate()
         (vendor/contao/core-bundle/contao/library/Contao/Controller.php:405)
      at Contao\Controller::getFrontendModule()
         (vendor/contao/core-bundle/contao/elements/ContentModule.php:59)
      at Contao\ContentModule->generate()
         (vendor/contao/core-bundle/contao/library/Contao/Controller.php:610)
      at Contao\Controller::getContentElement()
         (vendor/contao/core-bundle/contao/modules/ModuleArticle.php:189)
      at Contao\ModuleArticle->compile()
         (vendor/contao/core-bundle/contao/modules/Module.php:214)
      at Contao\Module->generate()
         (vendor/contao/core-bundle/contao/modules/ModuleArticle.php:69)
      at Contao\ModuleArticle->generate()
         (vendor/contao/core-bundle/contao/library/Contao/Controller.php:490)
      at Contao\Controller::getArticle()
         (vendor/contao/core-bundle/contao/library/Contao/Controller.php:356)
      at Contao\Controller::getFrontendModule()
         (vendor/contao/core-bundle/contao/pages/PageRegular.php:183)
      at Contao\PageRegular->prepare()
         (vendor/contao/core-bundle/contao/pages/PageRegular.php:47)
      at Contao\PageRegular->getResponse()
         (vendor/contao/core-bundle/contao/controllers/FrontendIndex.php:65)
      at Contao\FrontendIndex->renderPage()
         (vendor/symfony/http-kernel/HttpKernel.php:181)
      at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
         (vendor/symfony/http-kernel/HttpKernel.php:76)
      at Symfony\Component\HttpKernel\HttpKernel->handle()
         (vendor/symfony/http-kernel/Kernel.php:197)
      at Symfony\Component\HttpKernel\Kernel->handle()
         (public/preview.php:44)

  3. Support Staff 3 Posted by RockSolid Theme... on 06 Jun, 2025 08:44 AM

    RockSolid Themes's Avatar

    Vielen Dank für Ihre Nachricht.

    Dieser Stack-Trace ist leider nicht von der erwähnten Fehlermeldung array_map(): Argument #1 ($callback) must be a valid callback or null, class "StringUtil" not found sondern von einer Warning die damit nicht zusammenhängt.

    Aktualisieren Sie die Slider-Erweiterung bitte auf die neueste Version 2.2.8. Damit sollte die Warnung verschwinden und der Stack Trace der ursprünglichen Fehlermeldung zum Vorschein kommen.

  4. 4 Posted by Lisa on 11 Jun, 2025 06:51 PM

    Lisa's Avatar

    Vielen Dank. Das Update habe ich durchgeführt.

    Danach konnte ich über den Debug Modus kein Stack Trace mehr finden, ich bin damit aber leider auch nicht so vertraut. Vielleicht kann man das Problem auch über die Log-Einträge lösen?

    Vielen herzlichen Dank!

    [2025-06-11T20:45:33.044967+02:00] request.INFO: Matched route "contao_backend". {"route":"contao_backend","route_parameters":{"_route":"contao_backend","_scope":"backend","_controller":"Contao\\CoreBundle\\Controller\\BackendController::mainAction"},"request_uri":"https://www.DOMAIN.de/contao?act=edit&do=article&id=7604&ref=a_TZR_2v&table=tl_content","method":"POST"} {"request_uri":"https://www.DOMAIN.de/contao?act=edit&do=article&id=7604&ref=a_TZR_2v&table=tl_content","request_method":"POST"}
    [2025-06-11T20:45:33.095036+02:00] request.CRITICAL: Uncaught PHP Exception TypeError: "array_map(): Argument #1 ($callback) must be a valid callback or null, class "StringUtil" not found" at CustomElements.php line 1945 {"exception":"[object] (TypeError(code: 0): array_map(): Argument #1 ($callback) must be a valid callback or null, class \"StringUtil\" not found at /usr/www/users/ecoauto/DOMAIN_de/cto5/vendor/madeyourday/contao-rocksolid-custom-elements/src/CustomElements.php:1945)"} {"request_uri":"https://www.DOMAIN.de/contao?act=edit&do=article&id=7604&ref=a_TZR_2v&table=tl_content","request_method":"POST"}
    [2025-06-11T20:45:33.154453+02:00] messenger.INFO: Stopping worker. {"transport_names":["contao_prio_high"]} {"request_uri":"https://www.DOMAIN.de/contao?act=edit&do=article&id=7604&ref=a_TZR_2v&table=tl_content","request_method":"POST"}
    
  5. Support Staff 5 Posted by RockSolid Theme... on 12 Jun, 2025 03:27 PM

    RockSolid Themes's Avatar

    Vielleicht kann man das Problem auch über die Log-Einträge lösen?

    In der Tat ist in den Log-Einträgen der Ursprung des Fehlers zu erkennen: array_map(): Argument #1 ($callback) must be a valid callback or null, class "StringUtil" not found" at CustomElements.php line 1945

    Allerdings wurde dieser Fehler in der Datei CustomElements.php auf Zeile 1945 bereits vor drei Jahren behoben und sollte somit nicht mehr auftreten.

    Stellen Sie bitte sicher, dass Sie die neueste Version 2.4.13 der Erweiterung madeyourday/contao-rocksolid-custom-elements einsetzen. Die Fehlermeldung lässt vermuten, dass die veraltete Version 2.4.0 installiert ist.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac