Skip Navigation

[Resolved] Layouts on PHP 8.0: Error thrown Attempt to modify property "post_type" on null

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 3 replies, has 2 voices.

Last updated by webD-3 10 months, 3 weeks ago.

Assisted by: Waqar.


I have 3 client sites that were built using Toolset Layouts.

I'm in the process of upgrading my sites from PHP 7.4 to PHP 8.0.

2 of the 3 Layouts sites are now running PHP 8.0. This morning I got a "Your Site is Experiencing a Technical Issue" email for the site that upgraded to PHP 8.0 yesterday.

Error Details
An error of type E_ERROR was caused in line 150 of the file /chroot/home/ab03b439/ Error message: Uncaught Error: Attempt to modify property "post_type" on null in /chroot/home/ab03b439/
Stack trace:
#0 /chroot/home/ab03b439/ WPDD_PostEditPageManager->init()
#1 /chroot/home/ab03b439/ WPDD_PostEditPageManager->add_hooks()
#2 /chroot/home/ab03b439/ WPDD_Layouts->init_create_layout_for_pages('')
#3 /chroot/home/ab03b439/ WP_Hook->apply_filters(NULL, Array)
#4 /chroot/home/ab03b439/ WP_Hook->do_action(Array)
#5 /chroot/home/ab03b439/ do_action('init')
#6 /chroot/home/ab03b439/ require_once('/chroot/home/ab...')
#7 /chroot/home/ab03b439/ require_once('/chroot/home/ab...')
#8 /chroot/home/ab03b439/ require_once('/chroot/home/ab...')
#9 /chroot/home/ab03b439/ require_once('/chroot/home/ab...')
#10 {main}

Upon going to the actual page in a browser I see the error. I can also produce the error in the other site though it hasn't generated an email.

hidden link;
hidden link;

On the other hand, the third site, still running PHP 7.4, does not return an error.

hidden link;

As far as I can tell, both sites are performing as expected on both the front end and back end. At least I haven't noticed anything. But I wanted to send this to you. I'm leaving the sites at PHP 8.0 for now, unless I discover an issue for either visitors or my clients/Editors. But I also will not upgrade the final site until I know more.

If you have any questions or need me to provide additional information please let me know. Thank you!



Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)


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

I've performed some tests on my website, with PHP 8 and the Layouts plugin, but couldn't reproduce this error. This suggests that something specific to these websites is involved.

Can you please share the temporary admin login details of any of these websites, along with the exact steps to see the error? I'll also need your permission to download a clone/snapshot of the website, in case it needs to be investigated on a different server.

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




Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Matt,

Thank you for waiting as we were little light on the forum coverage during the holidays.

During further testing, I was able to reproduce this error on my test website too, with PHP 8 and the Layouts plugin. However, the specific URL that generates this error is not complete and I couldn't find any instance on the website where it is created to be accessible.
( the URL basically refers to a post edit screen without any information about the target post type or the post's ID ).

Most likely, on your website, this URL was accessed by accident and so this error is safe to ignore. If you see this URL generated anywhere on the website, where the admin or visitor can access it, you're welcome to let us know and we'll get it fixed, accordingly.



Waqar, thank you for your investigation and your reassurance that this error is safe to ignore.

If I find that this error can be generated by human action, either front-end or back-end, and it limits their ability to use the site, I'll let you know. But if this is merely an odd case that only happens when an RSS feed is accessed, I'm good with leaving things as they are.

Thanks again for your time and expertise.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.