Object Of Class StdClass Could Not Be Converted To String - Question | JoomShaper
🎃 Halloween Sale is Live! Get 35% OFF on all plans. Sale ends soon! Get Offer

Object Of Class StdClass Could Not Be Converted To String

MA

Marcus Anderson

SP Page Builder 3 years ago

Yesterday we got the following error when trying to edit a pagebuilder page:

"Object of class stdClass could not be converted to string"

This is actually the third time it's happened, and each time I've restored from a backup which fixes the problem but it's far from ideal.

Is this a known issue, and what's the fix? We can't keep restoring from a backup when it happens.

com_sppagebuilder_pro_v3.8.8

0
5 Answers
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 3 years ago #81414

okay, I am sharing my checking process and fix with you. This issue generally happens with the image source. Here are the steps that I follow:

  1. Go to the issue page and disable rows one by one.
  2. Find which rows is behind the issue.
  3. Then find the addon from the row.
  4. Then go to the addon site.php file.
  5. It could be in templates/template_name/sppagebuilder/addons/addon_name/site.php
  6. Then find line similar to this. Check for img src in the file.
    $output .= '<img src="' . $service_img . '">';
  7. Then change the line to this:
    $output .= '<img src="' . (is_string($service_img) ? $service_img : $service_img->src) . '">';

Hopefully, it will solve the issue.

Please accept the answer that helped you. It will be then easier to find the solution for the other users with the same issue. There is a button to accept answer after each comment.

I have a humble request too. It would be very kind of you if you can manage some moment to give us feedback on Joomla Extension Directory. This will inspire us to improve.

-1
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 3 years ago #81392

Hello Marcus Anderson

Apology for the inconvenience. Please recreate the issue and I will fix it. Share your administrator access here to check it. Use the Hidden Content box to share the credentials. Make sure that you have a full site backup with you before sharing.

Best regards

0
MA
Marcus Anderson
Accepted Answer
3 years ago #81399

Hi Ofi, If you know how to fix it, please share your knowledge so I can do it myself.

I do not know how to re-create the issue. It seems to happen without warning.

0
MA
Marcus Anderson
Accepted Answer
3 years ago #81839

Thank you. I'll follow that procedure when it happens next time.

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 3 years ago #81849

You are welcome 😊

I have a humble request. It would be very kind of you if you can manage some moment to give us feedback on Joomla Extension Directory. This will inspire us to improve.

0