Site logo

Archived topic

GP Premium giving javascript errors

3 replies · Started by thomas on April 25, 2021

Viewing posts 1–4 of 4

Hello,

I am really enjoying using GeneratePress Premium + WPBakery Page Builder, but I seem to get errors when GeneratePress Premium is enabled.

I have the latest version of Wordpress (Multisite) 5.7.1
GeneratePress 3.0.3
GenerarePress Premium 2.0.0-rc.2 (Have also tried latest stable)

TypeError: _.pluck is not a function /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=heartbeat,customize-base,customize-controls,customize-widgets,jquery-ui-slider,jquery-touch-punch,iris&ver=5.7.1
This happens when I open the customizer and the page simply doesnt work any longer. I cant navigate any options anymore or publish

I do not have these errors when GP Premium is disabled

Is there anything else I can try to fix this?

Hi there,

We aren't aware of any issues like this.

What happens if you deactivate your modules one by one in "Appearance > GeneratePress"? Does the error go away once a specific module is deactivated?

Hello,

Sorry but GP Premium does not seem to be the issue in the end. I had disabled GP Premium as a whole and was still getting the error.

I'm still unsure what caused this in the end, but it seems like (somewhere) a newer version of lodash is used that does not have the _.pluck function.

This seems to be solved by adding lodash 3.10.1 in the child theme functions.php

function addLodash() {
	wp_register_script('lodash3', 'https://cdn.jsdelivr.net/npm/lodash@3.10.1/index.min.js', false);
	wp_enqueue_script( 'lodash3' );
}
add_action('wp_enqueue_scripts', 'addLodash');

Thank you for the quick reply :)

Glad you got it sorted :)

This archived topic is closed to new replies.