Divi’s “Exit Visual Builder” admin bar link breaks with “Cache Logged-in Users”
-
A conflict has recently developed between the latest version of the popular Divi theme from Elegant Themes (https://www.elegantthemes.com/gallery/divi/) and the LiteSpeed Cache plugin.
The important “Enable Visual Builder” link in the admin bar is supposed to change to “Exit Visual Builder” when the visual builder is in use. However, when your LiteSpeed Cache plugin is enabled with the “Cache Logged-in Users” setting to “On”, the button breaks and always stays “Enable Visual Builder”.
The cause of this issue is Divi’s includes/builder/core.php file inside the et_fb_is_enabled() function (line 3796 in Divi 3.22.6) where it tests to see if the visual builder is enabled using the conditional “if ( empty( $_GET[‘et_fb’] ) )”.
The URL of any WordPress page being edited with the Divi visual builder ends with this: “?et_fb=1&PageSpeed=off” So without LiteSpeed Cache enabled, looking at the $_GET variable at this time returns:
array (
‘et_fb’ => ‘1’,
‘PageSpeed’ => ‘off’,
)And so the statement evaluates to true and the function knows that the Divi builder is enabled.
However, when the LiteSpeed Cache plugin’s “Cache Logged-in Users” setting is enabled, the $_GET variable at this time is replaced with this for some reason:
array (
‘lsesi’ => ‘admin-bar’,
‘_control’ => ‘private,no-vary’,
‘esi’ => ‘[long_string_of_numbers_and_letters_here]’,
‘_hash’ => ‘[long_string_of_numbers_and_letters_here]’,
)Because of this, the conditional evaluates to false and it breaks the functionality of the “Exit Visual Builder” button.
Can you fix this bug to continue supporting the popular Divi theme?
- The topic ‘Divi’s “Exit Visual Builder” admin bar link breaks with “Cache Logged-in Users”’ is closed to new replies.