簡體   English   中英

致命錯誤:未捕獲的 ReflectionException:方法 get_site_editor_type 不存在於...第 45 行

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

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM