Skip Navigation

[Resolved] Warning: Creating default object from empty value in

This support ticket is created 3 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 5 replies, has 2 voices.

Last updated by Lisa Boyd 3 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#2194965

I'm trying to edit the Content Template for a loop. I get the flash of the error then an error where it says "This block contains unexpected or invalid content."

hidden link

This is on a site (BevellsPIY) you still have access to for a previous issue you helped with today.

#2195499

Hi,

Thank you for contacting us and I'd be happy to assist.

To troubleshoot this, I'll need to see how this content template is set up in the admin area.

Can you please share temporary admin login details, in reply to this message?
( the admin access details are removed once a ticket is resolved, which is why they are no longer available in your other ticket )

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

regards,
Waqar

#2199369

Thank you for sharing the admin access.

The PHP warning message that was showing before the content template's loading, is now fixed, by selecting a preview post in the template's settings.
( screenshot: hidden link )

To investigate the message "This block contains unexpected or invalid content.", I'll need your permission to download a clone/snapshot of the website. This will help in troubleshooting this in more detail on a different server, without affecting the actual website.

#2199671

Yes, please clone the site to your server or let me know if you'd like me to setup a staging site to test this out.

Thanks!

#2202777

Thank you for waiting, while I performed some troubleshooting on your website's clone.

I noticed that your website's content template "Loop item in Parts Price List", contained the following HTML for the "Parts Price List" view's loop item:


<td>[types field="category"][/types] </td> 
<td> [wpv-post-title] </td> 
<td> $[types field="as-is-price"][/types] </td> 
<td> $[wpv-calculated-price increaseby="1.2"]</td>
<td> $[types field="core-fee"][/types] </td>

But, as this HTML code for the table is not complete, the blocks-based (Gutenberg) editor environment, treats this HTML code as invalid and shows the error.

To fix this, you can follow these steps:

1. From the "Parts Price List" view's edit screen, select the option "Stop using Block Editor for this Content Template".
( screenshot: hidden link )

2. And when the classic editor loads for this content template, you can include the same HTML code in that.
( screenshot: hidden link )

I hope this helps and please let me know if you need any further assistance around this.

#2202791

I continue to be very impressed with the support at Toolset! They go above and beyond in helping me fix a few issues I've run into. Thanks so much!