nk-crew / awb

Advanced WordPress Backgrounds with Gutenberg support. Images, Videos and Parallax

Home Page:https://wpbackgrounds.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

One of my two WordPress sites suddenly no longer supports AWB - Help!

rhst1 opened this issue · comments

One of my two WordPress sites suddenly no longer supports AWB - Help!

The site that works normally is https://wakarusariver.com

The site that just stopped working is https://fixyourbusinessyourself.org

They are both hosted by the same service and I believe have all the same basic settings.

I've attached one image that shows the error message:

awberror

And a second image showing that AWB is installed and activated

awbinstalled

Thanks for your help!

PS I have clicked the Install Background (AWB) blue button in the error message, but it doesn't fix anything.

Things I've checked (none of which fixed the problem):

  1. deactivated and reactivated AWB
  2. compared versions of WordPress, database, etc. between the two sites, everything I've checked is identical
  3. deleted plug-ins that thought might cause conflict

Hi, same here after updating WordPress to version 6.4.1. The AWB Gutenberg Block has stopped working.
Throws an error in console:
Uncaught TypeError: Cannot destructure property ‘compact’ of ‘window.lodash’ as it is undefined.

Hopefully AWB or someone else who knows how to fix these issues will respond soon. I've also reported my problem at the WordPress.org support forum, but have had no comments there, yet.

I'm testing an alternative plugin to AWB, that I may have to use instead. It's called Parallax Section - Block by bPlugins LLC

Hello, the quick solution that I have applied in my local installation is to add lodash as dependency:
In file advanced-backgrounds/classes/class-gutenberg.php, line 37, change:

$js_deps = array( 'wp-i18n', 'wp-element', 'wp-components', 'wp-block-editor', 'underscore', 'jquery', 'jarallax', 'jarallax-video' );

By:

$js_deps = array( 'wp-i18n', 'wp-element', 'wp-components', 'wp-block-editor', 'underscore', 'jquery', 'jarallax', 'jarallax-video', 'lodash' );

I hope they can fix it soon in the official plugin.

Thanks, tambaqui

I tried adding lodash and it made the errors on the WordPress editing page go away, but after saving the changes the actual page is still not functioning correctly.

I also looked at the code on the website that is working normally for me and saw that there is no lodash on line 37.

Fixed the remaining errors by reloading two of the images used in two different instances of AWB

Why do you think one website works only by adding lodash while the other site is good without it?

PS I'll add your fix to the WordPress.org forum

Ok @rhst1.
Probably the website that works without the lodash dependency is already loading it in another way, either because it is an older version of WordPress that already loads lodash by default in the editor or because another plugin is loading it secondary.
In any case AWB has that dependency, so if it is not available by default, it must be indicated in the list of dependencies.

Hi guys. Thank you for reporting to me. The plugin will be updated with a quick fix soon.

Excellent!