Issue with text editor

Hi, guys, how are you?

After the last update, I’m having an issue with the text editor module. Every time I try to add one instance of this module, it doesn’t show up. I drag the module, drop at a column, the loading animation starts, then it stops and the module isn’t loaded. I inspected the console at chrome devtools and it seems that there is an issue loading the module:

Text editor issue

When I save my layout, leave beaver builder, and then, enter beaver builder again, the instances of the text editor that I tried to insert are loaded, but if I try to insert more of them, the issue happens again.

Any ideas about this issue?

Thanks!

Hi Diego,

I’ll take a look at this today in my testing environment to see if I can recreate. Thanks for bringing this to our attention and apologies for any inconvenience!

Best,
Billy

Hey Diego,

I’ve been doing some playing around in my test environment and cannot recreate this issue. We did have something similar come up this morning and it ended up being a Chrome/caching issue. Can I have you clear your cache, quite and restart Chrome and give it a shot? Let me know how that goes for you.

Best,
Billy

Hi, Billy,

Thanks for the answer. Unfortunately, clearing the cache did not solve my issue. So, I dedided to make some tests.

I opened a blank page, with no content, and tried to insert a text editor module. It worked! So, what went wrong? I have a custom template named “default page”, and I’m using a custom slider module I built. When I import the custom template, the issue started to happen again! I removed module by module, and figured out that somehow, my custom slider module is conflicting with the text editor. Everytime I have an instance of the custom slider, the issue happens.

Can you guys take a look at my module to check what is wrong? I could send a .zip with my custom modules plugin, or I can give access to my website so you guys could look what’s going on.

Thanks!

Hi Diego,

Aha! Sure, we can take a look at what might have gone wrong in that custom module. Feel free to send it on over to us - I believe you already have our email?

Best,
Billy

Hi, Billy,

I have Justin’s email, I sent him the plugin, but I can send direct to you if you give me any email you want.

Thanks!

Thanks Diego, Justin being our lead dev, he is the perfect contact on this. We’ll get back to you as soon as we can on the issue!

Best,
Billy

Hey Diego,

It looks like you have a few JavaScript errors in your frontend.js.php file that may be causing this issue. Specifically, you’re not wrapping the autoplay value (no/yes) in quotes and there is no default value for loop. The comma after calculateHeight might be causing issues as well. Here’s the corrected code…

var slider = $slider.swiper( {
    mode: '<?php echo $settings->mode ?>',
    loop: <?php echo empty( $settings->loop ) ? 'true' : $settings->loop ?>,
    <?php if( $settings->autoplay && $settings->autoplay === 'yes' ): ?>
    autoplay: '<?php echo $settings->autoplay_value ?>',
    <?php endif; ?>
    calculateHeight: true
} );

Also, I’m not sure if you develop with WP_DEBUG on but there are quite a few PHP notices coming up.

Look into those issues and let me know how it goes.

Thanks,
Justin

Hi, Justin!

Thank you! You’re right, there were a lot of PHP notices! I knew about WP_DEBUG, but never used it. I guess that it’s a lesson for me!

I fixed all the notices, changed the code as you pointed, and now it’s working again!

Thank you guys for the awesome support!

Hey guys,

Sorry to reopen it, but after some work on my project, I got again the same issue. But this time, it happens when I insert a simple photo module. A page without this module is ok and I can insert a new text editor instance. But if I insert a photo module, the same issue pointed before happens again. I’m with WP_DEBUG on an not getting any php notice now. What could be happening?

If you guys want to, I can provide access to the website that I’m having this issue.

Thanks again!

Hi Diego,

No problem. Temporary admin and FTP access would be helpful. Send that over and I’ll have a look.

Thanks,
Justin

[Content Hidden]

Hey Diego,

It looks like the issue is with the Enable Media Replace plugin. It appears to be trying to work on the frontend but failing with this error message…

<b>Fatal error</b>: Call to undefined function get_current_screen() in <b>/home/favollac/public_html/guararema/wp-content/plugins/enable-media-replace/enable-media-replace.php</b> on line <b>65</b>

You might be able to get that to work by including the library for that on the frontend…

require_once ABSPATH . '/wp-admin/includes/screen.php';

I hope that helps!

Justin

Hi, Justin,

Thanks for all your work to track this bug! It looks indeed that the issue is with this plugin. I deactivated it and now it’s working ok. As I don’t use too much this plugin, I think I’ll keep it disabled and will enable it only when I need it. Maybe I’ll get in touch later with the plugin developer to point this issue.

Thanks! Awesome support, as always!