![](/img/trans.png)
[英]Fatal error: Uncaught ReflectionException: Class config does not exist
[英]Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist in... on line 45
我已经尝试了一切,我已经根据人们的建议替换并添加了新代码,但没有任何改进。 我仍然有同样的错误。
到目前为止没有任何工作......如果有人可以帮助我,我将不胜感激。
看起来您有一个最新版本的 elementor 插件,但在您当前的主题或其他一些插件中具有与最新更新不兼容的旧版本代码。 某些类或函数可能已被弃用,它们在新版本中有替代品。 如果您有可用的备份,请做一件事,然后将 elementor 或插件恢复到旧版本。 否则更新过时的代码。
打开这个文件:wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php
将此代码添加到第 46 行文件:
if (method_exists($class_name, "get_site_editor_type")) {
然后用 } 关闭第 54 行中的 if
最终结果是这样的:
if (method_exists($class_name, "get_site_editor_type")) {
$reflection = new \ReflectionClass( $class_name );
$method = $reflection->getMethod( 'get_site_editor_type' );
// It's own method, use it.
if ( $class_name === $method->class ) {
return static::get_site_editor_type();
}
}
我在几个网站上都发生过这种情况,我注释掉了这条线,它工作正常
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.