Небольшое обновление модуля:
Исправлена невозможность создания шорткода на других сайтах с уже существующим тегом
Для ручного исправления:
1. Открыть файл /modules/shortcode/controller/edit.php
2. найти код
public function execute($operation = NULL) {
$tag = Core_Array::getPost('tag');
$oSameShortCode = Core_Entity::factory('shortcode')->getBytag($tag);
if (!is_null($oSameShortCode) && $oSameShortCode->id != Core_Array::getPost('id'))
{
$this->addMessage(Core_Message::get(Core::_('shortcode.error_shortcode_tag'), 'error'));
return TRUE;
}
return parent::execute($operation);
}
3. заменить на
public function execute($operation = NULL) {
$tag = Core_Array::getPost('tag');
$oSameShortCode = Core_Entity::factory('shortcode');
$oSameShortCode->queryBuilder()
->where('tag', '=', $tag)
->where('site_id', '=', CURRENT_SITE);
$oSameShortCode = $oSameShortCode->find();
if (!is_null($oSameShortCode) && $oSameShortCode->id != Core_Array::getPost('id'))
{
$this->addMessage(Core_Message::get(Core::_('shortcode.error_shortcode_tag'), 'error'));
return TRUE;
}
return parent::execute($operation);
}
или
заменить этот файл из архива