Skip Navigation

[Resolved] As editor: publish post > fatal error 'invalid post type'

This support ticket is created 5 years, 6 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 2 replies, has 2 voices.

Last updated by Beda 5 years, 4 months ago.

Assisted by: Beda.

Author
Posts
#1246505

I do this:

1. login to wordpress network
2. go to site where I have editor role
3. create new post > click publish

Then I see an error message in browser:
"The site is experiencing technical difficulties. Please check your site admin email inbox for instructions."

When I hit back and go to posts > I see the published post.

In the server log we can see the following message:
PHP Fatal error: Uncaught InvalidArgumentException: incorrect post type in /.../wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php:69\nStack trace:\n#0 /.../wp-content/plugins/types/application/models/field/group/repeatable/service.php(605): Toolset_Field_Group_Post->__construct(Object(WP_Post))\n#1 /.../wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(381): Types_Field_Group_Repeatable_Service->group_contains_rfg_or_prf(109)\n#2 [internal function]: Toolset_Field_Group_Post_Factory->{closure}(Object(OTGS\\Toolset\\Common\\Field\\Group\\GroupDisplayResult))\n#3 /.../wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(258): array_filter(Array, Object(Closure))\n#4 /.../wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(430): Toolset_Field_Group_Post_Factory->filter_groups(Array, Array, Array)\n#5 /var/www/ in /.../wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php on line 69, referer: hidden link

When we disable toolset views on the site and try again we get the same error message in the browser, but with the following server message:

[Tue May 21 13:56:35.586686 2019] [:error] [pid 10180] [client 81.206.25.252:52443] PHP Fatal error: Uncaught InvalidArgumentException: incorrect post type in /.../wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php:69\nStack trace:\n#0 /.../wp-content/plugins/types/application/models/field/group/repeatable/service.php(605): Toolset_Field_Group_Post->__construct(Object(WP_Post))\n#1 /.../wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(381): Types_Field_Group_Repeatable_Service->group_contains_rfg_or_prf(109)\n#2 [internal function]: Toolset_Field_Group_Post_Factory->{closure}(Object(OTGS\\Toolset\\Common\\Field\\Group\\GroupDisplayResult))\n#3 /.../wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(258): array_filter(Array, Object(Closure))\n#4 /.../wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(430): Toolset_Field_Group_Post_Factory->filter_groups(Array, Array, Array)\n#5 /var/www/ in /.../wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php on line 69, referer: hidden link

#1246524

Apologies, this was caused by one of our own plugins.

#1285457

We have 2 more tickets with the same exact error mentioned but both due to different plugins, see:
https://toolset.com/forums/topic/fatal-php-error-if-i-broadcast-articles-to-other-sites-multisite/
https://toolset.com/forums/topic/error-by-sync-of-woocommerce-products-with-wc-multistore-plugin/

We would like to investigate and resolve this issue, can you help us by letting us know what plugin was the cause in your site and eventually, could you add a copy of it in the next private reply along with a step by step instruction about how to produce the issue?

Thanks!