Tutorials

Avia Layout Editor Loading and Integration Errors

Introduction

The Enfold theme (and accompanying Avia Layout Editor) is a very powerful and versatile theme. But like all themes, you can also run into problems when using it, especially if you have default hosting restrictions and conflicting script command on your website.

Enfold Theme and Avia Layout Editor Errors

The Enfold Theme and Avia Layout Editor can display errors in various ways. The most common ones are the infinite loading screen, white text and missing buttons in the virtual editor, and problems integrating with various plugins.

You may even be unable to switch to the layout editor using the button on the page editor.

What Causes Enfold Theme Errors?

Enfold and Avia Builder errors can usually be traced to one of the following reasons:

  • Conflicting PHP scripts.
  • Memory restrictions by your hosting service.
  • Incompatibility between Enfold/Avia and a plugin.
  • Incompatibility between plugins.

Before attempting any of the solutions below, it is best to try and undo and last edits and installations you made before getting the error, as this may likely be the cause. If these changes are absolutely necessary or you didn’t make any and are still getting errors then you can continue.

Solving Enfold Theme and Avia Layout Editor Errors

Before we begin, make sure you back up your website using the Backup or Backup Wizard options on your cPanel.

WPT-0077-069

You should also use a File Transfer Protocol (FTP) manager to help you safely transfer information to your website. In this post, we’ll be using FileZilla but there are several other solutions available.

Note: You can find your login credentials, in your hosting admin panel (outlined in green above).

Resolving Conflicting Enfold Theme PHP scripts

PHP is a powerful open source scripting language that your server uses to write dynamic web pages. The server executes PHP scripts and encounters any conflicts it won’t be able to execute resulting in the infinite loading screen, white text and missing buttons in the Avia Virtual Editor.

Step 1: To resolve this, we have to allow one script to load first by blocking the other using our FTP manager. Fill in your login credentials and click on Quickconnect. Your website folders and files are displayed on the right-hand side of FileZilla.

Step 2: Navigate to /wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php folder and locate the template-builder.class.php file. Right-click on it and click on the View/Edit option. Select the default text editor when prompted.

Step 3: Using the open notepad’s Find tool (Ctrl+F), search for this function: wp_enqueue_script. Then add two forward slashes to each of the five lines which begin with “wp_enqueue_script”, so you get:

//wp_enqueue_script…
//wp_enqueue_script…

This comments out that code, making it invisible to WordPress.

Step 4: Save your changes and sync your website files replacing the original.

WPT-0077-069

Step 5: Head back to WordPress and try editing any page using the Avia Layout Builder. This prompts the PHP scripts to remap and should clear all the errors.

Step 6: If successful, repeat Steps 1 and 2 and remove the forward slashes you added in Step 3. Save the file and sync your website files again.

Step 7: Refresh your website page, everything should work again.

Increasing Your WordPress Memory Limit

Your hosting server’s memory limits can prevent the Enfold Theme and Avia Layout Editor from loading properly, leading to errors.

Step 1: To increase this limit, navigate to the public_html folder using your FTP and locate the wp-config.php file. Right-click on it and click on the View/Edit option. Select the default text editor when prompted.

Step 2: In the notepad, paste the following code just after the opening <?php.

define(‘WP_MEMORY_LIMIT’, ‘128M’);

WPT-0077-069

Step 3: Save this file and sync it with your website files.

Step 4: Visit your website and try using the Layout Builder again to check if the problem is solved.

Note: You may have to contact some hosts directly for help if they do not provide the option for you to adjust your memory limits from your hosting panel.

Resolving Enfold/Avia Plugin Incompatibility Issues

Most Enfold and Avia users have noticed that plugins are unable to utilize the default visual editor (and sometimes the text/HTML editor). The default visual editor is either not accessible or just blank even when text is in there – making editing or adding forms and notifications a nightmare. This error particularly affects the Gravity Forms editor which relies heavily on the default visual editor but it may also affect other plugins.

Step 1: To resolve this bug, navigate to the /wp-content/themes/enfold folder using your FTP and locate the functions.php file. Right-click on it and click on the View/Edit option. Select the default text editor when prompted.

Step 2: Add this bit of code to allow the default editor load properly.

// FIX VISUAL EDITOR PROBLEM

function ww_remove_enfold_ls(){

global $pagenow;

if (( $pagenow == ‘admin.php’ ) && isset($_GET[‘page’]) && isset($_GET[‘subview’])) {

if(($_GET[‘page’] == ‘gf_edit_forms’) && ($_GET[‘subview’] == ‘notification’)){

remove_filter(‘mce_buttons’, ‘ls_register_mce_buttons’);

remove_filter(‘mce_external_plugins’, ‘ls_register_mce_js’);

}

}

}

add_action(‘init’, ‘ww_remove_enfold_ls’, 999);

Step 3: Save this file and sync it with your website files.

Step 4: Visit your website and try using the plugin again to check if the problem is solved.

Conclusion

WordPress errors usually don’t have a one-size-fits-all solution, so it is best that you try each solution until you find the one that works for you.

 

 

Leave A Comment
*
*

This site uses Akismet to reduce spam. Learn how your comment data is processed.