简体   繁体   English

致命错误:未捕获的 ReflectionException:方法 get_site_editor_type 不存在于...第 45 行

[英]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.

相关问题 致命错误:未捕获的 ReflectionException:Class 配置不存在 - Fatal error: Uncaught ReflectionException: Class config does not exist 致命错误:未捕获的 ReflectionException:Class “env”不存在 - Fatal error: Uncaught ReflectionException: Class "env" does not exist Laravel 5.1.11致命错误:消息为“类日志不存在”的未捕获异常“ Re​​flectionException” - Laravel 5.1.11 Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist' Laravel:致命错误:未捕获反射异常:Class App\Http\Kernel 不存在 - Laravel : Fatal error: Uncaught ReflectionException: Class App\Http\Kernel does not exist "致命错误 Laravel:当我查看我的网站时未捕获 ReflectionException" - Fatal Error Laravel: Uncaught ReflectionException when i view my Site 致命错误:未捕获的异常'ReflectionException' - Fatal error: Uncaught exception 'ReflectionException' 将我的 laravel api 上传到 000webhost 时出现此错误致命错误:未捕获的反射异常:Class“配置”不存在 - i have this error when uploading my laravel api to 000webhost Fatal error: Uncaught ReflectionException: Class "config" does not exist Laravel错误:未捕获的ReflectionException:类App \\ Http \\ Kernel不存在 - Laravel Error : Uncaught ReflectionException: Class App\Http\Kernel does not exist Laravel-未捕获的ReflectionException:类日志不存在-配置错误 - Laravel - Uncaught ReflectionException: Class log does not exist - Config error 未捕获的 ReflectionException:Class 请求在 Jenkins 中不存在 - Uncaught ReflectionException: Class request does not exist in Jenkins
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM