Forums › Forums › Bug Reports › Button (Improved) crashes when trying to insert links
Tagged: button
-
Button (Improved) crashes when trying to insert links
-
Hi there,
Suddenly/recently when trying to add a link into Button(Improved) it’s crashing the block with the following message: This block has encountered an error and cannot be previewed.
I’d noticed recently when using the block – in existing posts where I had set the block as being rounded, it appeared square in the editor but upon previewing it, was still rounded as per the settings. This was annoying but usable. Now however, it’s outright crashing whenever trying to add a link to it.
I’ve tried a combination of things to test if there’s something triggering it design wise, but they’re all the same.
Can you advise? There doesnt appear to be an update for the plugin – i assume maybe this has broken with the latest version of wordpress?
-
Hi @Marcus and @iqiqi ! Thanks for letting us know. The cause of the issue with adding links to the button block is on our end and has nothing to do with WordPress. We’ll be including a fix for it in the next version. If you urgently need the fix, please do the following:
- Save this file as blocks.build.js
- Locate the Ultimate Blocks plugin folder.
- Go to the dist folder and rename the existing file for blocks.build.js into something else to make reverting to the old version easier in case something goes wrong with the new version.
- Copy the file you downloaded into the dist folder.
Meanwhile, we’re able to recreate the issue with rounded buttons on our end and made a fix for it and a related issue as well. Not only did rounded buttons show up as normal in the editor, but the border radius is stuck at 60px in the frontend no matter the value set in the editor.
Part of it is already included in blocks.build.js. However, the rest of the fix is in another part. The steps for adding the fix is very similar to the one above if you also urgently need it:
- Save this file as init.php
- Locate the Ultimate Blocks plugin folder.
- Go to the src folder and rename the existing file for init.php into something else to make reverting to the old version easier in case something goes wrong with the new version.
- Copy the file you downloaded into the src folder.
Please let us know how it goes.
-
@Alexis – thanks so much for this information, I replaced the blocks.build.js as described and it has seemed to fix the error inserting links. I also noticed the blocks now appear rounded in the editor window again. Really appreciate your fast response on this one as it was somewhat urgent for me.
Didnt do the second part of the change but helpful to know its there incase needed.
Will this affect anything when you eventually roll out the update or will it just overright the files and be somewhat seamless? Any rough ETA on the next update?
Thanks a lot,
Marcus
-
Hi @Alexis
I have done both processes but the link is still not adding. It is showing me the same error “This block has encountered an error and cannot be previewed”. Please let me know the solution.
-
Hi @Gaurav ! Can you open up the developer console and check the error message that comes up? If, like in this screenshot, the source of the error message comes from our blocks.build.js file, you can click on the link, then click on either the “Pretty print” button just above the displayed code, or on the pair of braces that appears at the lower left corner. Both of them should turn the displayed code into something a bit more readable.
The error message should now reference a specific line within the compiled plugin code. Providing a screenshot would be fine, but clicking on the links should highlight the specific line where the error occurs, and a screenshot of it would be much better.
-
-
Nice to see that it worked, @Marcus . Although the upcoming update will overwrite the new files, the ones from the official release will be nearly or completely identical to the ones you have downloaded, and the fixes will remain. We can’t yet announce a specific date, but we’re hoping to release it within a week.
-
-
Hi @avi ! The exact error message displayed in your link comes up when trying to insert the release. However, it disappears when refreshing the page after the replacement blocks.build.js file is copied into the folder as per our instructions. Can you check if you copied it properly? Some warning messages appear in the current release of the plugin if you’re on the latest WordPress version. If you did everything correctly, none of these warning messages should be visible when selecting a button block.
Otherwise, on the resulting error message, please click on the first link for blocks.build.js and enable pretty-print. You will afterwards see the line that triggered the error message.
-
Hi @avi ! If you can still see my earlier response to you, please disregard it as I’m unable to either edit or delete it.
Anyway, the exact error message displayed in your link comes up when trying to add a link to the button when using the release version. However, it disappears when refreshing the page after the replacement blocks.build.js file is copied into the folder as per our instructions. Can you check if you copied it properly? Some warning messages appear in the current release of the plugin if you’re on the latest WordPress version. If you did everything correctly, none of these warning messages should be visible when selecting a button block.
Otherwise, on the resulting error message, please click on the first link for blocks.build.js and enable pretty-print. You will afterwards see the line that triggered the error message.
-
-
Hi I have a problem with buttons and list slyle. I have the last version of WP and UB
I attached url where you can see the error. https://www.saunaportatil.online/sauna-facial-portatil/
I dont know why. If you can help me please.
Thank you
-
This reply was modified 1 year ago by
Ancor.
-
This reply was modified 1 year ago by