• Resolved Robin W

    (@robin-w)


    when I add a block from my style pack, I get an error ‘This block has encountered an error and cannot be previewed.’. If you update and then show the page, the actual block shows, but with default settings.

    in console I see ‘The above error occurred in the <Lt> component: Lt@https://abc.co.uk/wp-content/plugins/wicked-block-builder/dist/generator.js?ver=1.4.3:1:70084 and a bunch of stuff after

    any ideas?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author wickedplugins

    (@wickedplugins)

    Hi @robin-w,

    Sorry for the delay, I was out for a bit last week.

    What do you mean by “when I add a block from my style pack”? Would it be possible for you to send me a JSON export of the block so I can look at it?

    Thread Starter Robin W

    (@robin-w)

    Very sorry, that’s the lazy sort of reporting I complain about (to myself!) for users posting issues to my plugins ??

    So these are some blocks I’ve added to my style pack plugin that adds features to the bbpress plugin. So they are not directly using your plugin, but your generator code and the files it creates are held in my plugin.

    But in trying to do a quick further check you great code works fine in one of my test sites, but produces errors in another test site.

    I can’t work out a difference between the sites, so I’ll leave you in peace unless you really fancy taking a site look. There are a few errors thrown in the console, but this is the first

    Uncaught TypeError: "tokens" is read-only
        Lt https://gos.rewweb.co.uk/wp-content/plugins/bbp-style-pack//generator/generator.js?ver=1:1
        renderWithHooks https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:16315
        mountIndeterminateComponent https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:20084
        beginWork https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:21597
        callCallback https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:4151
        invokeGuardedCallbackDev https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:4200
        invokeGuardedCallback https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:4264
        beginWork$1 https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:27461
        performUnitOfWork https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:26567
        workLoopSync https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:26476
        renderRootSync https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:26444
        performSyncWorkOnRoot https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:26095
        flushSyncCallbacks https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:12052
        ensureRootIsScheduled https://gos.rewweb.co.uk/wp-includes/js/dist/vendor/react-dom.js?ver=18.2.0:25661

    But very happy for you to say that this is beyond help. Your plugin is amazing, and I should have done more work before raising this.

    Plugin Author wickedplugins

    (@wickedplugins)

    Thanks for the additional info Robin. If you’d like to tell me what steps I can take to try out one of the blocks, I’d be happy to try it on my end to see if I can reproduce the issue. I installed your plugin but wasn’t sure what to do next.

    Thread Starter Robin W

    (@robin-w)

    thanks for your continued help.

    Having one test site working and another not, I have spent some time working out the difference, and I think I have a repeatable problem definition.

    So just using your plugin (ignore mine), if you set

    define ( 'SCRIPT_DEBUG', true); 

    in wp-config – then in the backend (ie adding a block in say a page) you will see the error

    This block has encountered an error and cannot be previewed.

    You should be able to see this easily, but if not below are the

    DETAILED STEPS TO REPRODUCE

    • install and activate wicked block builder.
    • Create a block (I just had one with a string attribute on the backend and one on the front end) but key you need something on the backend, or just use an existing
    • create test page and add the block to it – you should see it in the backend
    • delete the block and save the page
    • go into the wp-config file and add this debug
    define ( 'SCRIPT_DEBUG', true); 
    • upload the wp-config to the site.
    • now go back to the test page and try to add the block again, you should see
    This block has encountered an error and cannot be previewed.
    • If you go into the browser dev tools console, you see see a bunch of errors relating to the block.
    Plugin Author wickedplugins

    (@wickedplugins)

    Hey Robin,

    Thank you very much for providing these additional details. I was able to reproduce the issue and will get this fixed today.

    Thread Starter Robin W

    (@robin-w)

    brilliant ??

    Plugin Author wickedplugins

    (@wickedplugins)

    Hi Robin, I’ve pushed out a release that fixes this issue. If you still have any issues, please let me know.

    Thread Starter Robin W

    (@robin-w)

    thanks again for all your help – I’ll test and report back ??

    Thread Starter Robin W

    (@robin-w)

    ok, so yes that seems to all work fine with the wicked plugin.

    I now need to get it working with my style pack plugin which holds the generator files – wish I could remember how I did this, but I’ll do some digging and come back when I get stuck ??

    thanks again for your continued support

    Thread Starter Robin W

    (@robin-w)

    now all working in my plugin as well

    Thanks again for this amazing plugin and your awesome support ?? ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Not working with 6.4.3?’ is closed to new replies.