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

Undefined array key "deleteConfirm" prevents global debug mode setting in Contao 4.13.36 #7

Open
syntaxys opened this issue Jan 25, 2024 · 1 comment

Comments

@syntaxys
Copy link

  1. Installed Contao 4.13.36 with contao-owlcarousel 0.7.2 from scratch, running PHP 8.3.2
  2. Tried to set the global debug mode with APP_ENV=dev in .env.local and could not connect to the database anymore
  3. Response from console:
    CRITICAL [console] Error thrown while running command "contao:migrate --no-interaction -v --env=dev".
    Message: "Warning: Undefined array key deleteConfirm" ["exception" => ErrorException { …},"command" => "contao:migrate --no-interaction -v --env=dev","message" => "Warning: Undefined array key deleteConfirm"]
    In tl_owlcarousel.php line 83:
    [ErrorException]
    Warning: Undefined array key "deleteConfirm"

Solution A for users:
Add $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] = 'Löschen bestätigen'; in contao-4.13/system/config/langconfig.php

Solution B for extension developer:
Change contao-4.13/vendor/respinar/contao-owlcarousel/src/dca/tl_owlcarousel.php, line 83 from
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'
to
'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? null) . '\'))return false;Backend.getScrollOffset()"'
Same in contao-4.13/vendor/respinar/contao-owlcarousel/src/dca/tl_owlcarousel_slide.php, line 87

Setting the global debug mode is possible again …

@hamidpeywasti
Copy link
Member

Hi, I check this.

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

2 participants