• Jelajahi

    Copyright © blog bodi
    Best Viral Premium Blogger Templates

    Iklan

    [Solve]Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist

    bodi.web.id
    26 Agustus 2022, Agustus 26, 2022 WIB Last Updated 2024-08-15T06:57:38Z
    [[---]]
    [[---]]

    [Solve]Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist

    Halo semuanya, hari ini kami sempat mengalami kendala untuk website WordPress yang baru saja di migrasi dari CPanel ke VPS.

    Pesan errornya yaitu ” Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist “

    Website yang kami migrasi ke VPS ini menggunakan Elementor sebagai theme frameworknya, untuk mengatasi masalah diatas bisa ikuti langkah-langkah seperti dibawah ini :

    Buka file theme-documen.php, dan cari line dimana terjadi error, pada kasus ini ada di line 47

    ...../wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php on line 47

    kemudian cari kode di baris ke 47

    protected static function get_site_editor_type_bc() {    static $types = [];    $class_name = static::get_class_full_name();    $reflection = new \ReflectionClass( $class_name ); //45 line    $method = $reflection->getMethod( 'get_site_editor_type' );    // It's own method, use it.    if ( $class_name === $method->class ) {        return static::get_site_editor_type();    }    // _deprecated_function( 'get_name', '3.0.0', 'get_site_editor_type' );    // Fallback, get from class instance name (with caching).    if ( isset( $types[ $class_name ] ) ) {        return $types[ $class_name ];    }    $instance = new static();    $types[ $class_name ] = $instance->get_name();    return $types[ $class_name ];}

    Alternatif penyelesaian masalah :

    • Solusi 1 : Non aktifkan error kode pada /wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php on line 47
    $method = $reflection->getMethod( 'get_site_editor_type' );

    setelah dinonaktifkan akan menjadi seperti dibawah ini :

    //$method = $reflection->getMethod( 'get_site_editor_type' );

     

    • Solusi 2 : tambahkan kode pada file theme-document.php
    $reflection = new \ReflectionClass( $class_name ); //45 line$method = $reflection->getMethod( 'get_site_editor_type' );// It's own method, use it.if ( $class_name === $method->class ) {    return static::get_site_editor_type();}

    setelah ditambah kode akan menjadi seperti dibawah ini :

    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();    }}

    Setelah dilakukan perubahan pada salah satu alternatif diatas, maka permasalahan saat ini sudah tidak muncul lagi.

    Selamat mencoba ….

     

     

    Komentar

    Tampilkan

    Terkini