Skip Navigation

[Resolved] WP NEW PAGE creation now throws an exception

This thread is resolved. Here is a description of the problem and solution.

Problem:
When trying to create a new Page after deleting some post relationships, I see a Fatal Error and I cannot continue.

PHP Fatal error: Uncaught InvalidArgumentException: First argument is not a post. in /path/to/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group.php:60

Solution:
Purge all server-side caching and try again.

This support ticket is created 5 years, 9 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.

Our next available supporter will start replying to tickets in about 6.97 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by jacka-4 5 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1200681

Ive been creating and deleting new post types, forms, views, taxonomies, etc.
Then deleting them all and starting from scratch.

I have ONE custom post type left w/ an associated custom field set.
I have ONE form associated with it, left as well.
Deleted everything else.

Not sure TOOLSET is doing proper cleanup when you delete stuff.

Now when I try to create any new WP page, it throws an exception.
Stack trace from php log
----------------------------------------
[14-Feb-2019 19:02:05 UTC] PHP Fatal error: Uncaught InvalidArgumentException: First argument is not a post. in /home/hgorg/www.hanggliding.org/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group.php:60
Stack trace:
#0 /home/hgorg/www.hanggliding.org/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php(41): Toolset_Field_Group->__construct(NULL)
#1 /home/hgorg/www.hanggliding.org/wp-content/plugins/types/vendor/toolset/types/embedded/includes/fields-post.php(158): Toolset_Field_Group_Post->__construct(NULL)
#2 /home/hgorg/www.hanggliding.org/wp-content/plugins/types/vendor/toolset/types/embedded/admin.php(107): wpcf_add_meta_boxes('page', Object(WP_Post))
#3 /home/hgorg/www.hanggliding.org/wp-includes/class-wp-hook.php(286): wpcf_admin_add_meta_boxes('page', Object(WP_Post))
#4 /home/hgorg/www.hanggliding.org/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#5 /home/hgorg/www.hanggliding.org/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#6 /home/hgorg/ww in /home/hgorg/www.hanggliding.org/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group.php on line 60

Stack trace shows in the browser as well. I have DEBUG enabled.

#1200693

Hi, I can see your site uses a Redis object caching system. Can you try purging the object cache and any other server-side caching systems? You may have to log into your server's control panel to do this. On another User's site, purging the cache recently solved a similar problem.

#1200694

I already go it working, but you are likely very correct.

Once I bounced ALL caches - including redis, it started working again.
Ill keep this is in mind when I hit glitches in the future.