I’m playing around with acf and gutenberg and wordpress networks.
But I’ve stumbled upon a strange bug.
Locally I have a wordpress setup without a wp-network and there my custom theme works with it’s customizer stuff.
But when I upload the theme to my server where I’ve enabled a wordpress network the customer ui doesn’t load.
I’m getting this error
acf-blocks.js?ver=5.8.0-beta2:138 Uncaught TypeError: Cannot read property ‘registerBlockType’ of undefined
at acf.registerBlockType (acf-blocks.js?ver=5.8.0-beta2:138)
at Array.map (<anonymous>)
at Object.acf.registerBlockTypes (acf-blocks.js?ver=5.8.0-beta2:73)
at acf.Model.initialize (acf-blocks.js?ver=5.8.0-beta2:158)
at acf.Model.t (acf-input.min.js?ver=5.8.0-beta2:1)
at u (acf-input.min.js?ver=5.8.0-beta2:1)
at Object.i (acf-input.min.js?ver=5.8.0-beta2:1)
at Object.c.doAction (acf-input.min.js?ver=5.8.0-beta2:1)
at HTMLDocument.<anonymous> (acf-input.min.js?ver=5.8.0-beta2:1)
at i (load-scripts.php?c=1&load=jquery-core,jquery-migrate,underscore,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-dragg&load=able,jquery-ui-droppable,backbone,wp-backbone,wp-ajax-response,jquery-color,wp-lists,postbox,nav-menu,shortcode,utils,media-mode&load=ls,moxiejs,plupload,wp-plupload&ver=4.9.8:2)
When I debug the code, the thing that is failing is this line
var result = wp.blocks.registerBlockType( blockType.name, blockType );
wp.blocks is undefined which causes the whole thing to blow up.
Could it be that wp network is somehow changing the priority of the included scripts which is causing the problem?
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users