Troubleshooting
Fix the "Uncaught ReflectionException: Method get_site_editor_type does not exist" error
The full error usually looks something like this:
PHP Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist in /home/USUARIO/public_html/wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php:45
It appears when the version of Elementor Pro is not compatible with that of Elementor, of WordPress or of an add-on that adds template types to the Theme Builder. Elementor Pro looks for a method that the other component does not have, and the site or the editor breaks.
Permanent fix: update
If you can log in to the WordPress dashboard:
- Go to Dashboard > Updates.
- Update Elementor and Elementor Pro to the latest version. Elementor Pro only updates if the licence is active in Elementor > License; if it has expired, download the latest version from your my.elementor.com account and upload it in Plugins > Add New > Upload Plugin.
- Also update the Elementor add-ons (widget packs, Theme Builder add-ons) and the theme.
If the error persists after updating everything, deactivate the Elementor add-ons one by one: the one that makes it disappear is the incompatible one. Look for an updated version or an alternative.
If you cannot log in to the dashboard: temporary patch
When the error also takes down the WordPress dashboard, this patch gives you access back so you can update. It is lost as soon as you update Elementor Pro, which is exactly what we want.
From the cPanel File Manager or by FTP, open:
wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php
Search for get_site_editor_type (it is around line 45). You will find this block:
$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(); }
Wrap it in an if ( method_exists( ... ) ) { ... } check so it looks 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(); } }
Save the file and reload the site: the error disappears. Log in to the dashboard and carry out the updates from the previous section.
Make a copy of the file before editing it. If another syntax error appears when you save it, check that you have closed the } brace at the end of the block.
If you would rather not touch the code
You can regain access by deactivating Elementor Pro: in the File Manager, rename the wp-content/plugins/elementor-pro folder to elementor-pro-off. The site will load without the Theme Builder templates (header, footer, etc.).
Log in to the dashboard, update Elementor and upload the latest version of Elementor Pro (the zip from your Elementor account) in Plugins > Add New > Upload Plugin. Activate it, check that the site and the editor work and delete the elementor-pro-off folder. Do not give the old folder its original name back: the error would return.
You may also find useful
- 404 errors on static files slow down browsing Detect missing static resources that trigger PHP and use CPU, serve them as lightweight 404s and gui...
- Debug errors in WordPress with WP_DEBUG Enable WP_DEBUG in wp-config.php to display WordPress errors or log them to a file and find the caus...
- Diagnose "Missed schedule" Check why a scheduled post was not published before replacing WP-Cron with a server task.
- Diagnose Sodium cryptographic errors in WordPress Tell a missing Sodium extension apart from an invalid argument in sodium_compat before changing the...
Something wrong or out of date? Tell us and we will review it.