[英]Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist in... on line 45
I have tried everything, I have replaced and added a new code based on what people suggested but nothing has improved.我已经尝试了一切,我已经根据人们的建议替换并添加了新代码,但没有任何改进。 I am still having the same error.我仍然有同样的错误。
Nothing has working so far... I would appreciate if anyone can help me.到目前为止没有任何工作......如果有人可以帮助我,我将不胜感激。
It looks like you have an elementor plugin to the latest version but in your current theme or some other plugins having the old version code which is not compatible with the latest update.看起来您有一个最新版本的 elementor 插件,但在您当前的主题或其他一些插件中具有与最新更新不兼容的旧版本代码。 Some classes or functions may be deprecated and they have alternatives in the new version.某些类或函数可能已被弃用,它们在新版本中有替代品。 Do one thing if you have a backup available then restore the elementor or plugin to the old version.如果您有可用的备份,请做一件事,然后将 elementor 或插件恢复到旧版本。 Else update the code which is outdated.否则更新过时的代码。
open this file: wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php打开这个文件:wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php
add this code to line 46 file:将此代码添加到第 46 行文件:
if (method_exists($class_name, "get_site_editor_type")) { if (method_exists($class_name, "get_site_editor_type")) {
then close the if in line 54 with }然后用 } 关闭第 54 行中的 if
the final result is like this:最终结果是这样的:
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();
}
}
I have had this happen on several sites and I comment out the line and it works fine我在几个网站上都发生过这种情况,我注释掉了这条线,它工作正常
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.