PHP error on buttons - Forum | JoomShaper
Awaiting an answer SP Page Builder

PHP error on buttons

Asked by Simon Logan 5 years ago Last activity 5 years ago

Started getting this error on multiple sites now when there is a button present but only if the button is edited (ie existing ones untouched don't seem to trigger the error):

Recoverable fatal error: Object of class stdClass could not be converted to string in /path-to-site-on-server/www/mywebsite.com/public_html/components/com_sppagebuilder/addons/button/site.php on line 25

14 replies

Simon Logan Asked this
5 years ago · edited

Sorry I selected the wrong site there and can't edit it after posting, should be https://www.exterity.com

Also the site was running on PHP 7.3 so I tried switching to 7.4 but error was the same.

Ofi Khan Staff

Hello Simon Logan

Please share the site.php file here. I will fix it and send it back.

Best regards

Simon Logan Asked this

I don't seem to be able to attach anything - it's just the core file from the latest release, however. The line in question is this one:

$attribs .= (isset($settings->url) && $settings->url) ? ' href="' . $settings->url . '"' : '';
Ofi Khan Staff

Please share your administrator access here to check. Use the Hidden Content box to share the credentials.

Simon Logan Asked this

Here you go

Ofi Khan Staff

Please share the exact page link of where the issue occurs so that I can see it.

Simon Logan Asked this

I'm comfortable editing the source file if you let me know what adjustment needs made by the way.

Simon Logan Asked this

It was occurring on the homepage so i had to disable all the buttons there otherwise it would look like the entire site was down, let me try and find another page as an example.

Simon Logan Asked this

It's on the homepage now if you look quickly

Simon Logan Asked this

Although I can only leave it like that for a few seconds for obvious reasons, it's a high-traffic site.

To view it yourself if you edit the homepage and re-enable some of the buttons, then save and refresh the page - as long as you can immediately revert the buttons to unpublished if the page goes down.

Log in to reply.