diff --git a/src/Contao/Widgets/MultiColumnWizard.php b/src/Contao/Widgets/MultiColumnWizard.php
index b15abc9e..c570debb 100644
--- a/src/Contao/Widgets/MultiColumnWizard.php
+++ b/src/Contao/Widgets/MultiColumnWizard.php
@@ -1071,16 +1071,21 @@ protected function initializeWidget(&$arrField, $intRow, $strKey, $varValue)
// Add the help wizard
if (isset($arrField['eval']['helpwizard']) && $arrField['eval']['helpwizard']) {
+ $label = (isset($arrField['label']) && is_array($arrField['label']) && isset($arrField['label'][0]))
+ ? $arrField['label'][0]
+ : 'Help';
+
+ // Construct the help wizard link
$xlabel .= ' '
- . Image::getHtml(
- 'about.gif',
- $GLOBALS['TL_LANG']['MSC']['helpWizard'],
- 'style="vertical-align:text-bottom"'
- ) . '';
+ . '" title="' . StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['helpWizard'])
+ . '" onclick="Backend.openModalIframe({\'width\':735,\'height\':405,\'title\':\''
+ . StringUtil::specialchars(str_replace("'", "\\'", $label))
+ . '\',\'url\':this.href});return false">'
+ . Image::getHtml(
+ 'about.gif',
+ $GLOBALS['TL_LANG']['MSC']['helpWizard'],
+ 'style="vertical-align:text-bottom"'
+ ) . '';
}
// Add the popup file manager
diff --git a/src/ContaoManager/Plugin.php b/src/ContaoManager/Plugin.php
index f758b45c..c7580cfb 100644
--- a/src/ContaoManager/Plugin.php
+++ b/src/ContaoManager/Plugin.php
@@ -3,7 +3,7 @@
/**
* This file is part of menatwork/contao-multicolumnwizard-bundle.
*
- * (c) 2012-2019 MEN AT WORK.
+ * (c) 2012-2024 MEN AT WORK.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -15,7 +15,7 @@
* @author Stefan Heimes
* @copyright 2011 Andreas Schempp
* @copyright 2011 certo web & design GmbH
- * @copyright 2013-2019 MEN AT WORK
+ * @copyright 2013-2024 MEN AT WORK
* @license https://github.com/menatwork/contao-multicolumnwizard-bundle/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/
@@ -37,7 +37,7 @@ class Plugin implements BundlePluginInterface
/**
* {@inheritdoc}
*/
- public function getBundles(ParserInterface $parser)
+ public function getBundles(ParserInterface $parser): array
{
return [
BundleConfig::create(MultiColumnWizardBundle::class)
diff --git a/src/EventListener/Contao/ExecutePostActions.php b/src/EventListener/Contao/ExecutePostActions.php
index fb3032cc..861a99bd 100644
--- a/src/EventListener/Contao/ExecutePostActions.php
+++ b/src/EventListener/Contao/ExecutePostActions.php
@@ -256,7 +256,8 @@ public function executePostActions($action, DataContainer $container)
// Add the sub configuration into the DCA. We need this for contao. Without it is not possible
// to get the data for the picker.
if (
- ($GLOBALS['TL_DCA'][$container->table]['fields'][$mcwBaseName]['inputType'] == 'multiColumnWizard')
+ (($GLOBALS['TL_DCA'][$container->table]['fields'][$mcwBaseName]['inputType'] ?? null)
+ === 'multiColumnWizard')
&& !($container instanceof DataContainerInterface)
) {
$widget = MultiColumnWizard::generateSimpleMcw($container->table, $mcwBaseName);
diff --git a/src/EventListener/Mcw/TinyMce.php b/src/EventListener/Mcw/TinyMce.php
index 971128f7..adbfe98e 100644
--- a/src/EventListener/Mcw/TinyMce.php
+++ b/src/EventListener/Mcw/TinyMce.php
@@ -46,9 +46,9 @@ public function executeEvent(GetTinyMceStringEvent $event)
$table = $event->getTableName();
$fieldId = $event->getFieldId();
- list ($file, $type) = explode('|', $field['eval']['rte'], 2);
+ list ($file, $type) = explode('|', $field['eval']['rte'] ?? '') + [null, null];
- $fileBrowserTypes = array();
+ $fileBrowserTypes = [];
// Since we don't know if this is the right call for other versions of contao
// we won't use dependencies injection.
$pickerBuilder = System::getContainer()->get('contao.picker.builder');
@@ -59,11 +59,14 @@ public function executeEvent(GetTinyMceStringEvent $event)
}
}
+ // Convert fileBrowserTypes to a comma-separated string for TinyMCE compatibility.
+ $fileBrowserTypesString = implode(',', $fileBrowserTypes);
+
/** @var BackendTemplate|object $objTemplate */
$objTemplate = new BackendTemplate('be_' . $file);
$objTemplate->selector = 'ctrl_' . $fieldId;
$objTemplate->type = $type;
- $objTemplate->fileBrowserTypes = $fileBrowserTypes;
+ $objTemplate->fileBrowserTypes = $fileBrowserTypesString;
$objTemplate->source = $table . '.' . $fieldId;
// Deprecated since Contao 4.0, to be removed in Contao 5.0