oveleon / contao-component-style-manager

This extension is for the Contao CMS and allows you to easily manage and provide custom categories and groups for CSS classes.
MIT License
23 stars 6 forks source link

Error opening content element #85

Closed operatorone closed 1 year ago

operatorone commented 1 year ago

I have the version 3.2 installed in a Contao 4.13.16. When I click on a content element to edit it, I get the following message:

[2023-03-23T12:14:11.694056+01:00] request.INFO: Matched route "contao_backend". {"route":"contao_backend","route_parameters":{"_route":"contao_backend","_scope":"backend","_token_check":true,"_controller":"Contao\\CoreBundle\\Controller\\BackendController::mainAction"},"request_uri":"https://www.edukativa.eu/contao?act=edit&do=article&id=14&ref=dr5T2Czz&rt=048c3fc36d2ded5dbe83a8dbeef7e.PJLr2Al6GOLjPS61WaM6ybSWDZe-eoJr8reLcRHq9hQ.UfCT7WE2TKGtambZGOd4mef6SdLNLcAllY7hCyTesGNI3aCeRTB3hoZeWQ&table=tl_content","method":"GET"} [] [2023-03-23T12:14:11.853586+01:00] request.CRITICAL: Uncaught PHP Exception TypeError: "Cannot access offset of type string on string" at /homepages/8/d618066693/htdocs/contao_live/vendor/oveleon/contao-component-style-manager/src/StyleManager/StyleManager.php line 241 {"exception":"[object] (TypeError(code: 0): Cannot access offset of type string on string at /homepages/8/d618066693/htdocs/contao_live/vendor/oveleon/contao-component-style-manager/src/StyleManager/StyleManager.php:241)"} []

Any Ideas how to resolve this?

operatorone commented 1 year ago

Found the trouble causing record. See screenshot: https://share.cleanshot.com/MmNlYkScHKXGHlMmkYVq I think it is the "-" in the alias which causes this error 500.

zoglo commented 1 year ago

I can not reproduce this issue as well. As I've asked in #84 , can you provide me with a dump?

zoglo commented 1 year ago

Closing this issue as this issue only occurs when you:

Correct way to handle this: