• Resolved StevenJRossi

    (@stevenjrossi)


    Since I’ve updated to Gutenberg, I’m not able to get any of the AJAX functionality to work on the edit pages for my products. For example, when I go to an “edit product” page, I can’t do things like expand/collapse meta boxes, drag to rearrange the meta boxes, or edit the slug. Is this a known issue? Is there a workaround?

    When I took a look at the Console, all I found was this:

    Uncaught TypeError: Cannot read property 'length' of undefined
        at HTMLDocument.<anonymous> (post.php?post=12733&action=edit:278)
        at i (jquery.js?ver=1.12.4:2)
        at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
        at Function.ready (jquery.js?ver=1.12.4:2)
        at HTMLDocument.K (jquery.js?ver=1.12.4:2)

    Line 278 has this:

    jQuery("#excerpt_counter").val(jQuery("#meta-textarea").val().length);

    Any thoughts are much appreciated!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @stevenjrossi,

    Cross testing for you today using the latest version of WordPress and WooCommerce to gain some comparison results the admin functionality is working correctly on our test installs. When testing we used an install with the only plugin enabled being WooCommerce and the free Storefront theme enabled.

    Usually, isolated behaviour like what you describe and which are not displaying on any other installs can be related to code with another plugin or a theme which is activated on a site and which is causing a conflict of some kind.

    Have you tested on your site by disabling all other plugins aside from WooCommerce and also switching theme temporarily to a theme like the free Storefront theme and see if that resolves this behaviour? If it does, try enabling your plugins back one at a time to see which one could be causing the problem.

    If you haven’t carried out this type of testing on your site it’s what we would recommend

    Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi, @stevenjrossi!

    What version of Gutenberg are you using?

    Cheers!

    Thread Starter StevenJRossi

    (@stevenjrossi)

    I’m glad you replied, @rynald0s, because I see now that my previous reply/marking as resolved didn’t go through. I have the latest general version of WP, but I was actually able to solve the problem. Stuart’s suggestion to disable all plugins reminded me of some pretty old meta box code I had written but no longer using that was having some compatibility issues. So I’m all good now. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘AJAX in Add/Edit Product Not Working in 5.0’ is closed to new replies.