Open rustykowski opened 1 month ago
Have you got any other extensions installed? The __selector__
should never be a string.
yes, a few:
"bugbuster/contao-visitors-bundle": "^1.8",
"codefog/contao-cookiebar": "^2.5",
"codefog/contao-events_subscriptions": "^2.16.3",
"contao/calendar-bundle": "4.13.*",
"contao/conflicts": "*@dev",
"contao/manager-bundle": "4.13.*",
"contao/news-bundle": "4.13.*",
"contao/newsletter-bundle": "4.13.*",
"dklemmt/contao_dk_mmenu": "^3.2",
"do-while/contao-backupdb-bundle": "^1.5",
"inspiredminds/contao-glightbox": "^1.0",
"jrgregory/m17-sticky-backend-footer": "^2.0",
"madeyourday/contao-rocksolid-custom-elements": "^2.4",
"terminal42/contao-easy_themes": "^3.0",
"terminal42/contao-pageimage": "^4.1",
"terminal42/notification_center": "^1.6",
"thescrat/contao-loginlink": "^1.0"
the last updated first-level dependency was thescrat/contao-loginlink
Honestly I don't think error is coming from my extension. There must be a different extension that modifies the __selector__
to be a string, whereas it must be an array. Is there any custom code in your app?
Honestly I don't think error is coming from my extension. There must be a different extension that modifies the
__selector__
to be a string, whereas it must be an array. Is there any custom code in your app?
I think the error is caused by your extension. The error message says that the selector is wrong. The selector must be an array and the index should be a string.
So you can fix the error by doing this:
$GLOBALS['TL_DCA']['tl_member']['palettes']['__selector__']['subscription_enableLimit'] = 'subscription_enableLimit';
The selector must be an array and the index should be a string.
The selector already is an array: https://github.com/codefog/contao-events_subscriptions/blob/master/dca/tl_member.php#L26
The key is not relevant, as you can see in any Contao core file: https://github.com/contao/contao/blob/5.x/core-bundle/contao/dca/tl_member.php#L85
To dump what's causing an error, you could try to dump the selector in file var/cache/prod/contao/dca/tl_member.php
on line 223 (!):
dd($GLOBALS['TL_DCA']['tl_member']['palettes']['__selector__']);
I've discovered the following warning:
Warning: Array to string conversion {"exception":"[object] (ErrorException(code: 0): Warning: Array to string conversion at /www/htdocs/.../var/cache/prod/contao/dca/tl_member.php:152)"} []
The relevant line (2nd line) is:
namespace {
$GLOBALS['TL_DCA']['tl_member']['palettes'] = \str_replace('{account_legend}', '{loginLink_legend},loginLink,loginLinkGen;{account_legend}', $GLOBALS['TL_DCA']['tl_member']['palettes']);
\array_insert($GLOBALS['TL_DCA']['tl_member']['fields'], \count($GLOBALS['TL_DCA']['tl_member']['fields']), array('loginLink' => array('label' => &$GLOBALS['TL_LANG']['tl_member']['loginLink'], 'inputType' => 'text', 'eval' => array('minlength' => 10, 'unique' => \true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'loginLinkGen' => array('label' => &$GLOBALS['TL_LANG']['tl_member']['loginLinkGen'], 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'clr', 'submitOnChange' => \true), 'save_callback' => array(array('tl_loginLink', 'loginLinkGen')), 'sql' => "int(1) unsigned NOT NULL default '0'")));
Can you recognize anything from this?
sorry, @qzminski this is a problem with contao-loginlink V. 1.0.11, the problem disappears after a downgrade.
Dann stammt das doch aus meiner Erweiterung. In der Master besteht der Fehler nicht, nur im Branch der 4.13, da hier noch nicht mit dem PaletteManipulator gearbeitet wurde. Hab gerade nen neues Release veröffentlich 1.0.12 (ist exakt der Stand aus der Master). Probier das mal aus @rustykowski
ja, sehr gut, kein warmup-Fehler mehr. Danke @thescrat!
Contao 4.13.49 contao-events_subscriptions 2.16.4
Exception in file var/cache/prod/contao/dca/tl_member.php on line 224[] operator not supported for strings
The content of line 224 is:
$GLOBALS['TL_DCA']['tl_member']['palettes']['__selector__'][] = 'subscription_enableLimit';
stacktrace: