Back

Fixed – Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist

Need to fix Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist

If you are using Elementor Pro Page Builder and other related plugins that compliments Elementor you may be dealing with this fatal error.

Below is the full context of this fatal error. 

   

Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist’

The good news is that we can give you the exact thing that you need to do to get this fixed quickly and your website functioning again.

– Connect to your website files using FTP or your hosting control panel

– Navigate to the file path /wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php

Code snippet form file : /wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php:45

fatal-error-uncaught-reflectionexception-method-get-site-editor-type-does-not
$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();
}

Replace following code to quick fix.

fixed-fatal-error-uncaught-reflectionexception-method-get-site-editor-type-does-not
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();
    }
}
SwaggerUnit
SwaggerUnit

Leave a Reply

Your email address will not be published. Required fields are marked *

We use cookies to give you the best experience. Cookie Policy

Designed and Developed by SwaggerUnit

We are Ready to Help Your Business Grow

Your business deserves the best—let’s start working on a solution together

Preferred Contact Method
Services Interested In(Required)