提问人:Joe Hughes 提问时间:10/12/2022 更新时间:10/12/2022 访问量:106
Redactor/HTMLPurifier 不允许条目更新 CraftCMS
Redactor/HTMLPurifier won't allow entry update CraftCMS
问:
我对这一切相当陌生......你们能帮我弄清楚这里出了什么问题吗?
我的网站大部分都很好。但是,当我尝试编辑 Redactor 字段时,出现错误
Class 'HTMLPurifier_AttrDef_HTML_ContentEditable' not found
如果我按“保存”,它只会给我一个工艺风格的内部服务器错误页面
从工艺的 web.log 文件中堆栈跟踪...尝试在我的生产服务器(DigitalOcean、RunCloud)上保存条目时会发生这种情况。在我的开发堆栈(Lando)上工作正常
2022-10-11 16:51:02 [-][1][u3gqq1j4ho4jmi8dnbbdtm0e9u][error][Error] Error: Class 'HTMLPurifier_AttrDef_HTML_ContentEditable' not found in /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTypes.php:44
Stack trace:
#0 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModuleManager.php(77): HTMLPurifier_AttrTypes->__construct()
#1 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php(187): HTMLPurifier_HTMLModuleManager->__construct()
#2 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php(630): HTMLPurifier_HTMLDefinition->__construct()
#3 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php(611): HTMLPurifier_Config->initDefinition()
#4 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/craftcms/cms/src/helpers/HtmlPurifier.php(51): HTMLPurifier_Config->getDefinition()
#5 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/yiisoft/yii2/helpers/BaseHtmlPurifier.php(53): craft\helpers\HtmlPurifier::configure()
#6 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/craftcms/html-field/src/HtmlField.php(193): yii\helpers\BaseHtmlPurifier::process()
#7 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/craftcms/redactor/src/Field.php(506): craft\htmlfield\HtmlField->serializeValue()
#8 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/craftcms/cms/src/base/Element.php(2150): craft\redactor\Field->serializeValue()
#9 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/yiisoft/yii2/validators/InlineValidator.php(84): craft\base\Element->validateCustomFieldContentSize()
#10 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/yiisoft/yii2/validators/Validator.php(261): yii\validators\InlineValidator->validateAttribute()
#11 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/yiisoft/yii2/base/Model.php(367): yii\validators\Validator->validateAttributes()
#12 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/craftcms/cms/src/services/Elements.php(2562): yii\base\Model->validate()
#13 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/craftcms/cms/src/services/Elements.php(785): craft\services\Elements->_saveElementInternal()
#14 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/craftcms/cms/src/controllers/EntriesController.php(407): craft\services\Elements->saveElement()
#15 [internal function]: craft\controllers\EntriesController->actionSaveEntry()
#16 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#17 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()
#18 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()
#19 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/craftcms/cms/src/web/Application.php(293): yii\base\Module->runAction()
#20 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/craftcms/cms/src/web/Application.php(602): craft\web\Application->runAction()
#21 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/craftcms/cms/src/web/Application.php(272): craft\web\Application->_processActionRequest()
#22 /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest()
#23 /home/teraukura/webapps/Te_Raukura/Te-Raukura/web/index.php(21): yii\base\Application->run()
#24 {main}
有时也会在日志中得到这个?
[12-Oct-2022 15:38:55 Pacific/Auckland] PHP Fatal error: Trait 'GuzzleHttp\ClientTrait' not found in /home/teraukura/webapps/Te_Raukura/Te-Raukura/vendor/guzzlehttp/guzzle/src/Client.php on line 17
答: 暂无答案
评论
require __DIR__ . '/../vendor/autoload.php';
index.php