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 1 year, 3 months ago.

Assisted by: Waqar.

Author
Posts
#2523903

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/a3dbae8221.nxcli.net/html/wp-content/plugins/layouts/classes-auto/wpddl.post-edit-page-manager.class.php. Error message: Uncaught Error: Attempt to modify property "post_type" on null in /chroot/home/ab03b439/a3dbae8221.nxcli.net/html/wp-content/plugins/layouts/classes-auto/wpddl.post-edit-page-manager.class.php:150
Stack trace:
#0 /chroot/home/ab03b439/a3dbae8221.nxcli.net/html/wp-content/plugins/layouts/classes-auto/wpddl.post-edit-page-manager.class.php(77): WPDD_PostEditPageManager->init()
#1 /chroot/home/ab03b439/a3dbae8221.nxcli.net/html/wp-content/plugins/layouts/classes/wpddl.class.php(366): WPDD_PostEditPageManager->add_hooks()
#2 /chroot/home/ab03b439/a3dbae8221.nxcli.net/html/wp-includes/class-wp-hook.php(308): WPDD_Layouts->init_create_layout_for_pages('')
#3 /chroot/home/ab03b439/a3dbae8221.nxcli.net/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#4 /chroot/home/ab03b439/a3dbae8221.nxcli.net/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /chroot/home/ab03b439/a3dbae8221.nxcli.net/html/wp-settings.php(617): do_action('init')
#6 /chroot/home/ab03b439/a3dbae8221.nxcli.net/html/wp-config.php(121): require_once('/chroot/home/ab...')
#7 /chroot/home/ab03b439/a3dbae8221.nxcli.net/html/wp-load.php(50): require_once('/chroot/home/ab...')
#8 /chroot/home/ab03b439/a3dbae8221.nxcli.net/html/wp-admin/admin.php(34): require_once('/chroot/home/ab...')
#9 /chroot/home/ab03b439/a3dbae8221.nxcli.net/html/wp-admin/post.php(12): require_once('/chroot/home/ab...')
#10 {main}
  thrown

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!

#2524733

Waqar
Supporter

Languages: English (English )

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

Hi,

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.

regards,
Waqar

#2530045

Waqar
Supporter

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.

regards,
Waqar

#2530323

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.