Elementor Typography Class Error

User
thrown in /home/deft/public_html/wp-content/themes/dt-the7/inc/mods/compatibility/elementor/widgets/nav-menu.php on line 515
[25-Mar-2025 11:49:15 UTC] PHP Fatal error: Uncaught Error: Class "ElementorCoreSchemesTypography" not found in /home/deft/public_html/wp-content/themes/dt-the7/inc/mods/compatibility/elementor/widgets/nav-menu.php:515
Stack trace:
#0 /home/deft/public_html/wp-content/plugins/elementor/includes/base/controls-stack.php(2433): The7ModsCompatibilityElementorWidgetsNav_Menu->register_controls()
#1 /home/deft/public_html/wp-content/plugins/elementor/includes/base/widget-base.php(1050): ElementorControls_Stack->init_controls()
#2 /home/deft/public_html/wp-content/plugins/elementor/includes/base/controls-stack.php(569): ElementorWidget_Base->init_controls()
#3 /home/deft/public_html/wp-content/plugins/elementor/includes/base/widget-base.php(184): ElementorControls_Stack->get_stack()
#4 /home/deft/public_html/wp-content/plugins/elementor/includes/managers/widgets.php(391): ElementorWidget_Base->get_stack()
#5 [internal function]: ElementorWidgets_Manager->ajax_get_widget_types_controls_config()
#6 /home/deft/public_html/wp-content/plugins/elementor/core/common/modules/ajax/module.php(176): call_user_func()
#7 /home/deft/public_html/wp-includes/class-wp-hook.php(324): ElementorCoreCommonModulesAjaxModule->handle_ajax_request()
#8 /home/deft/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#9 /home/deft/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#10 /home/deft/public_html/wp-admin/admin-ajax.php(192): do_action()
#11 {main}
thrown in /home/deft/public_html/wp-content/themes/dt-the7/inc/mods/compatibility/elementor/widgets/nav-menu.php on line 515
Assistant
The error you're seeing:

PHP Fatal error:  Uncaught Error: Class "ElementorCoreSchemesTypography" not found

…means that the **`ElementorCoreSchemesTypography`** class is being used but is not available. This typically happens when:

### 🧩 What's Going Wrong?

1. **Incompatible or outdated version of Elementor**:
The theme (The7) is trying to use a class from Elementor that may have been removed or renamed in a newer version.

2. **Custom widget or code (like in `nav-menu.php`)** is relying on something that Elementor no longer provides in the same way.

3. **File corruption or incomplete Elementor installation** can also cause this.

### ✅ Solution Steps

#### 🔹 1. **Update Everything**

– **Elementor**: Make sure you're using the **latest version** of Elementor.
– **The7 Theme**: Ensure that the **theme is up to date**, as the compatibility code is coming from `dt-the7/inc/…`.

> Both the plugin and the theme must support each other’s versions.

#### 🔹 2. **Restore Missing Class or Use Alternative**

If Elementor recently removed or renamed the class, and the theme hasn’t caught up:

– The `Typography` scheme class used to exist in:

use ElementorCoreSchemesTypography;

– But in newer versions of Elementor, it might be:

use ElementorScheme_Typography;

So you can try modifying this line in `nav-menu.php` (line ~515) to:

use ElementorScheme_Typography;

#### 🔹 3. **Temporary Workaround (if urgent)**

Comment out or replace the part of the code using the missing class:
In `/themes/dt-the7/inc/mods/compatibility/elementor/widgets/nav-menu.php` around line 515:

// 'typography' => Typography::get_type(),

Change to:

// 'typography' => ElementorScheme_Typography::get_type(), // or just comment temporarily

⚠️ This may remove typography control temporarily but should avoid the fatal error.

### 🛡️ Final Tip

If you’re using a **child theme**, override the widget or fix it there so updates don’t override your fix.

If you want, you can share the block of code around line 515 and I can help you rewrite it to support newer Elementor versions properly.

Leave a Comment

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