ECB2 error

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
10010110
Translator
Translator
Posts: 217
Joined: Tue Jan 22, 2008 9:57 am

ECB2 error

Post by 10010110 »

This is a split off from the topic at viewtopic.php?p=350683#p350683 due to the change of subject. So, if I add a “type” parameter to the ECB2 content module tag, I get a fatal error. Before I wrongfully file a bug report I wanted to ask here to exclude a mistake on my side. This is the template code:

Code: Select all

{content_module module=ECB2 block=test field=file_picker type=audio}
and the error is this:

Code: Select all

PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in ~/tmp/templates_c/CMSContentManager^28d3fefc35b1733c24f2fa8d1daa3c2deacb5954_1.module_file_tpl.CMSContentManager;admin_editcontent.tpl.php:324
Stack trace:
#0 ~/lib/smarty/sysplugins/smarty_template_resource_base.php(128): content_66218b1b41b151_08598638(Object(CMS_Smarty_Template))
#1 ~/lib/smarty/sysplugins/smarty_template_compiled.php(172): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(CMS_Smarty_Template))
#2 ~/lib/smarty/sysplugins/smarty_internal_template.php(206): Smarty_Template_Compiled->render(Object(CMS_Smarty_Template))
#3 ~/lib/smarty/sysplugins/smarty_internal_templatebase.php(216): Smarty_Internal_Template->render(false, 0)
#4 ~/lib/smarty/sysplugins/smarty_internal_templatebase.php(107): Smarty_Internal_TemplateBase->_execute(Object(CMS_Smarty_Template), NULL, NULL, NULL, 0)
#5 ~/lib/classes/internal/class.CMS_Smarty_Template.php(20): Smarty_Internal_TemplateBase->fetch(NULL, NULL, NULL, NULL)
#6 ~/lib/classes/internal/class.Smarty_CMS.php(374): CMS_Smarty_Template->fetch()
#7 ~/lib/classes/internal/module_support/modtemplates.inc.php(142): Smarty_CMS->fetch('module_file_tpl...', '', 'CMSContentManag...')
#8 ~/lib/classes/class.CMSModule.php(2612): cms_module_ProcessTemplate(Object(CMSContentManager), 'admin_editconte...', '', false, '')
#9 ~/modules/CMSContentManager/action.admin_editcontent.php(350): CMSModule->ProcessTemplate('admin_editconte...')
#10 ~/lib/classes/class.CMSModule.php(1403): include('/Users/Example/...')
#11 ~/lib/classes/class.CMSModule.php(1479): CMSModule->DoAction('admin_editconte...', 'm1_', Array, '')
#12 ~/admin/moduleinterface.php(74): CMSModule->DoActionBase('admin_editconte...', 'm1_', Array, '', Object(Smarty_CMS))
#13 {main}
  thrown in ~/tmp/templates_c/CMSContentManager^28d3fefc35b1733c24f2fa8d1daa3c2deacb5954_1.module_file_tpl.CMSContentManager;admin_editcontent.tpl.php on line 324, referer: http://cmsms.loc/
The field works fine if I don’t have any type parameter. If I set the parameter value to “image” the field reverts from a clickable plus icon to the default file picker field and I get two warnings:
PHP Warning: Undefined array key "dir" in ~/lib/classes/contenttypes/Content.inc.php on line 551
PHP Warning: Undefined variable $sort in ~/lib/classes/contenttypes/Content.inc.php on line 572
Any other parameter value gives me the fatal error. Is this me or is this a bug in the module?
I’m using PHP 8.0.30, by the way.
Post Reply

Return to “Modules/Add-Ons”