• Resolved xxxsimoxxx

    (@xxxsimoxxx)


    Continued from this thread

    Hi, I’m having problems (the page metabox is corrupted) with version 1.0.30.2.
    post-metabox.js is not included because the dependency with lodash is not satisfied.

    Using ClassicPress 1.0.1 (like WordPress 4.9).

    Thank you very much.
    Simone.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Rank Math

    (@rankmath)

    Hello @xxxsimoxxx

    Thank you for contacting the support and sorry for the issue you are facing.

    Can you please try adding the following function to your theme’s functions.php file and see if the issue resolves?

    add_action( 'rank_math/admin/enqueue_scripts', function() {
        wp_enqueue_script( 'lodash', 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.core.min.js' );
    });

    Looking forward to helping you.

    Thread Starter xxxsimoxxx

    (@xxxsimoxxx)

    Thank you very much for the quick reply.
    No, that function didn’t solve.

    I’ve solved with this code in a plugin:

    add_action( 'admin_init', 'cpcompatibility_fix_rankmath' );
    function cpcompatibility_fix_rankmath(){
    	if ( is_plugin_active( 'seo-by-rank-math/rank-math.php' ) ) {
    		if ( ! wp_script_is( 'lodash', 'registered' ) ) {
    			wp_register_script( 'lodash', plugins_url( 'js/lodash.min.js', __FILE__ ));
    		}
    	}
    }

    I’ve tried just

    if ( is_plugin_active( 'seo-by-rank-math/rank-math.php' ) ) {
    		if ( ! wp_script_is( 'lodash', 'registered' ) ) {
    			wp_register_script( 'lodash', plugins_url( 'js/lodash.min.js', __FILE__ ));
    		}
    	}

    but was creating troubles on an installation.

    Thank you very much.
    Simone.

    Plugin Author Rank Math

    (@rankmath)

    Hello Simone,

    We have identified the issue and the same shall be fixed in an upcoming update.

    We seek your patience and understanding in this matter.

    Thank you.

    Plugin Author Rank Math

    (@rankmath)

    Hello @xxxsimoxxx

    Please update to the latest version of the plugin.

    The issue should be resolved.

    Appreciate your patience. Thank you.

    Thread Starter xxxsimoxxx

    (@xxxsimoxxx)

    It’s solved.
    Thank you very much!
    Simone.

    Plugin Author Rank Math

    (@rankmath)

    Hello @xxxsimoxxx

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    Good day.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘problem with lodash library’ is closed to new replies.