Forums › Forums › Bug Reports › Unidefined Index error and buttons disappeared
-
Unidefined Index error and buttons disappeared
-
I have a site that I migrated from the previous owner’s hosting provider to mine. It was working fine for a few days. Then it suddenly started giving me this error: Notice: Undefined index: buttonRadius in /home/a247prof/sustainpunch.com/wp-content/plugins/ultimate-blocks/src/init.php on line 200. That error showed up in search results, and also when I was trying to edit a post. Also, all of my product link buttons disappeared. When I disabled the plugin, that stopped the errors from happening, but the buttons are still gone. I have a lot of links inside 80 articles. My site heavily relies on this plugin. Any thoughts on what I can do to fix this and get my buttons back without errors?
-
Hi @JEVentures ! Thanks for letting us know. We’re able to recreate the error on our end and tracked down its cause. We’ll be including a fix for this in the next release. If you need the fix urgently, here’s what you can do:
- Download this file and save it as “init.php”.
- Locate the folder that contains all of your plugins. In your case, it’s /home/a247prof/sustainpunch.com/wp-content/plugins .
- Go to ultimate-blocks/src.
- Rename the existing init.php file into something else (so that you could bring it back easily if something goes wrong with the new one).
- Copy the init.php file into the folder.
Please let us know how it goes.
-
Thank you. It appears to have fixed the error code issue, but all of the buttons that were on the pages before this happened are still missing. Would it make sense to go back to a backup of the site before I started seeing this issue, take the same steps you mentioned at a point in time when I wasn’t getting those errors, and then see what happens?
-
Here is what is happening now after following the steps you described.
- The search and error code issues are gone, which is good.
- I am able to see the buttons on my WP Admin panel when I am editing a post in WP Admin, but the text that was associated with that button is showing some weird text instead of the “Buy Now At Amazon” or whatever the original button text was.
- The button is showing up when I do a preview of the post in WP Admin, but it is still not showing up on the live site after updating the post.
- You can see screenshots for the issues described above here.
-
<div>Okay, it now seems to be okay, except for the button label issue and a couple of instances where the image is not aligned properly with the button in live mode even thought it seems fine in the preview mode.</div><div>
</div><div>
I would prefer not to have to go through every button and manually change the label for each one. Is there a way to change the label of every button currently on the site in batch?
</div>
-
Hi @JEVentures ! Can you link to those cases where the button block isn’t aligned properly with the image above it? We changed the default button alignment from center to left and back again to center not too long ago, and we included ways to handle those abrupt transitions. However, manually editing them is often the only way to ensure that they’re aligned properly.
-
Hi Alexis,
I ended up going to a prior backup because I didn’t want to wait and lost clicks to products for any longer, especially with Prime Day. Everything works okay now, and I have a theory as to what happened, and maybe you can confirm or reject the theory.
My theory is that the posts were likely created using Classic Editor or Gutenberg editor. I wanted to add a stylized Amazon affiliate disclaimer to the top of all posts, so I manually went through each post and added a stylized HTML block at the top of all posts using Elementor. It seems like Ultimate Blocks didn’t play well with the conversion of the editor from default WP editor to Elementor, and that is when all the buttons broke and errors started happening.
When I reverted everything back, instead of using Elementor to put the disclaimer on top of the posts, I used Ad Inserter to do that. Everything seems to be working fine with the Ultimate Blocks buttons and search page now. Let me know your thoughts. Thanks.
-
Hi @JEVentures ! We design our blocks with the Gutenberg editor in mind, thus we cannot guarantee the compatibility of our blocks with third-party editors. The transition to Elementor being the cause of all the errors you experienced is plausible.
There’s a plugin that allows you to use reusable blocks in other editors via shortcodes. You can follow this guide if you want to use Ultimate Blocks within Elementor (or any other third-party editor), but keep in mind that the blocks can’t always be rendered in third-party editors the way they appear in Gutenberg.
-
Hi Alexis,
Thank you for your follow-up. I will look at the plugin and guide you sent me. For now, I will stick to editing with Gutenberg editor until I learn more about this.
Regards,
JE