diff --git a/administrator/components/com_categories/Field/CategoryeditField.php b/administrator/components/com_categories/Field/CategoryeditField.php index e75a578231912..a4d82a8c7f975 100644 --- a/administrator/components/com_categories/Field/CategoryeditField.php +++ b/administrator/components/com_categories/Field/CategoryeditField.php @@ -364,6 +364,7 @@ protected function getInput() $data['options'] = $this->getOptions(); $data['allowCustom'] = $this->allowAdd; + $data['customPrefix'] = $this->customPrefix; $data['refreshPage'] = (boolean) $this->element['refresh-enabled']; $data['refreshCatId'] = (string) $this->element['refresh-cat-id']; $data['refreshSection'] = (string) $this->element['refresh-section']; diff --git a/administrator/components/com_categories/layouts/joomla/form/field/categoryedit.php b/administrator/components/com_categories/layouts/joomla/form/field/categoryedit.php index 2645a45de6136..97c87c0b9d80a 100644 --- a/administrator/components/com_categories/layouts/joomla/form/field/categoryedit.php +++ b/administrator/components/com_categories/layouts/joomla/form/field/categoryedit.php @@ -46,6 +46,7 @@ * @var array $options Options available for this field. * @var array $inputType Options available for this field. * @var string $accept File types that are accepted. + * @var string $customPrefix Optional prefix for new categories. */ $html = array(); @@ -72,9 +73,9 @@ { $attr2 .= ' allow-custom'; - if ($this->customPrefix !== '') + if ($customPrefix !== '') { - $attr2 .= ' data-custom_value_prefix="' . $this->customPrefix . '" '; + $attr2 .= ' new-item-prefix="' . $customPrefix . '" '; } } diff --git a/administrator/components/com_content/Model/ArticleModel.php b/administrator/components/com_content/Model/ArticleModel.php index b23a2544208e8..43c4b8d65d57f 100644 --- a/administrator/components/com_content/Model/ArticleModel.php +++ b/administrator/components/com_content/Model/ArticleModel.php @@ -780,8 +780,6 @@ public function save($data) $data['images'] = (string) $registry; } - \JLoader::register('CategoriesHelper', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'); - // Create new category, if needed. $createCategory = true;