Custom Fields
Re-Envisioned
Support General Need Help — Everything breaks in WP 5.6 — Need a hand to start debugging

  • Creator
    Topic
  • #23614
    Resolved Teia Local Studio
    Participant

    Hey, guys.

    All my work, for at least 3 years, is totally based on MetaBox Suite of Tools. I always updated WordPress to latest versions and everything was always smooth. But this morning I moved to WordPress 5.6 (on a test environment) and, right upon activating my theme, I got severe JS errors, who break the DRAG and DROP functionality and also the TABS on SETTINGS PAGE as well (and I believe it could happen in other instances too).

    Need help to start debugging. I have no idea what path should I go since the console logs point to internal WordPress files, and not to my own theme files. Here is the shot:

    JS errors

    I know it is impossible to find the problem just by looking this info, but any lead could help. What could I do first?

    I will try remove scripts from my theme one by one, perhaps I can find where the whole problem starts, at least.

    Any idea, suggestion, comment, could help.
    Thank you so much.
    G.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #23615
    Teia Local Studio
    Participant

    I believe the issue is not directly related to MetaBox itself, forgot to mention. I am just looking form some ideas, after all.

    Thanks.

    #23616
    Teia Local Studio
    Participant

    Oh.

    I really can’t replicate the bug.
    Tried on a new fresh WP install, with my theme…

    Nothing wrong happened.

    Restored the database from the problematic one, changed back to my theme (I went to defaults for test) and the problem is gone.

    Really have no idea. Perhaps some kind of JS browser cache when I updated to 5.6?

    No idea.
    Anyway, thanks everybody.
    Moderation, feel free to lock the topic, please.

    #23622
    Teia Local Studio
    Participant

    Just to put a closure here — found the problem and it was not metabox related… But it worth mention, could help someone else in a similar situation.

    I was using 2 filters to remove the VERSION in the enqueued scripts and styles on theme. Apparently this was the root of the problem when updating WP version with this code running.

    
    function remove_css_js_version($src) {
        if (strpos($src, '?ver='))
            $src = remove_query_arg('ver', $src);
        return $src;
    }
    add_filter('style_loader_src', 'remove_css_js_version', 9999);
    add_filter('script_loader_src', 'remove_css_js_version', 9999);
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.