• slimmilkduds

    (@slimmilkduds)


    Hi, getting this error in the console when opening the editor:

    deactivator.build.js?ver=5.1:6 Uncaught (in promise) TypeError: deactivatedBlocks.forEach is not a function
        at deactivator.build.js?ver=5.1:6

    Something is apparently wrong with this:

    _wpLoadBlockEditor.then( function() {
    
      // Deactivate Blocks
      var deactivatedBlocks = JSON.parse(advancedGutenbergBlocksDeactivated);
    
      deactivatedBlocks.forEach( block => {
      	wp.blocks.unregisterBlockType(block);
      } );
    
    } );

    Running latest version of wordpress and this plugin.

Viewing 1 replies (of 1 total)
  • Plugin Author maximebj

    (@maximebj)

    Weird !

    Can you type JSON.parse(advancedGutenbergBlocksDeactivated) in your browser console and tell me what it says ?

    Do you have some blocks disabled or none ?

Viewing 1 replies (of 1 total)
  • The topic ‘error in deactivate block’ is closed to new replies.