In the xml file for a module, I call a custom field class:
<config>
<fields name="params">
<fieldset name="basic" addfieldprefix="Myextension\Name\Administrator\Field">
<field name="category_id" type="categorylist" default="0"
none="MOD_MYMODULE_PARAM_CATEGORYLIST_NONE"
description="MOD_MYMODULE_PARAM_CATEGORYLIST_NONE_DESC"
label="MOD_MYMODULE_PARAM_CATEGORYLIST_NONE" multiple="true" size="5">
<option value="0">MOD_MYMODULE_PARAM_CATEGORYLIST_NONE</option>
</field>
</fieldset>
</fields>
</config>
In the file CategorylistField, I call HTMLHelper:
class CategorylistField extends ListField
{
protected $type = 'CategoryList';
protected function getInput(): string
{
return HTMLHelper::_('myextensionhtml.categorylist', $options, $this->element, $attribs, $this->value);
}
}
When I edit the module, I have an error:
500 JHtml myextensionhtml not found on JROOT\libraries\src\HTML\HTMLHelper.php:156
In my component, the call of HTMLHelper::_('myextensionhtml.categorylist'
works, why doesn't it work in the module?