Home › Toolset Professional Support › [Resolved] fatal PHP error if i broadcast articles to other sites (multisite)
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 |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10: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/Kolkata (GMT+05:30)
Tagged: Access plugin, Types plugin
This topic contains 19 replies, has 4 voices.
Last updated by nicolaT-2 5 years, 4 months ago.
Assisted by: Minesh.
I am trying to:
Use "broadcast" (hidden link) plugin to publish posts to other network sites.
On save there is a php error (here on my local environment, which are identical except of the path):
PHP Fatal error: Uncaught InvalidArgumentException: incorrect post type in /Applications/AMPPS/www/win-verlag.test/wp-content/plugins/types-access/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php:70 Stack trace: #0 /Applications/AMPPS/www/win-verlag.test/wp-content/plugins/types/application/models/field/group/repeatable/service.php(605): Toolset_Field_Group_Post->__construct(Object(WP_Post)) #1 /Applications/AMPPS/www/win-verlag.test/wp-content/plugins/types-access/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(381): Types_Field_Group_Repeatable_Service->group_contains_rfg_or_prf(81405) #2 [internal function]: Toolset_Field_Group_Post_Factory->{closure}(Object(OTGS\Toolset\Common\Field\Group\GroupDisplayResult)) #3 /Applications/AMPPS/www/win-verlag.test/wp-content/plugins/types-access/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(258): array_filter(Array, Object(Closure)) #4 /Applications/AMPPS/www/win-verlag.test/wp-content/plugins/types-access/vendor/t in /Applications/AMPPS/www/win-verlag.test/wp-content/plugins/types-access/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php on line 70
or if i deactivate the types-access module
PHP Fatal error: Uncaught InvalidArgumentException: incorrect post type in /Applications/AMPPS/www/win-verlag.test/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php:69 Stack trace: #0 /Applications/AMPPS/www/win-verlag.test/wp-content/plugins/types/application/models/field/group/repeatable/service.php(605): Toolset_Field_Group_Post->__construct(Object(WP_Post)) #1 /Applications/AMPPS/www/win-verlag.test/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(381): Types_Field_Group_Repeatable_Service->group_contains_rfg_or_prf(81405) #2 [internal function]: Toolset_Field_Group_Post_Factory->{closure}(Object(OTGS\Toolset\Common\Field\Group\GroupDisplayResult)) #3 /Applications/AMPPS/www/win-verlag.test/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(258): array_filter(Array, Object(Closure)) #4 /Applications/AMPPS/www/win-verlag.test/wp-content/plugins/types/vendor/toolset/toolset-common/inc/au in /Applications/AMPPS/www/win-verlag.test/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php on line 69
The values in the __constructor() are:
self::POST_TYPE ===> "wp-types-group"
$field_group_post->post_type ====> "post" or sometimes "attachment"
Link to a page where the issue can be seen:
Original article: hidden link
I expected to see:
No PHP fatal error.
Instead, I got:
A PHP fatal error which results in a forever blinking "Save" indicator in the backend (post edit form of the original article). No article gets broadcasted.
Would appreciate your help.
Hello. Thank you for contacting the Toolset support.
Can you please share that broadcast plugin which you are using (please mention any specific configurations needed to setup the plugin or plugin settings) as well as exact steps to setup that plugin and exact steps to reproduce the issue.
I have set the next reply to private which means only you and I have access to it.
We do not recommend to perform a test on production sites.
Can you please share that broadcast plugin zip which you are using (please mention any specific configurations needed to setup the plugin or plugin settings) as well as exact steps to setup that plugin and exact steps to reproduce the issue.
The exact steps I need to perform to reproduce the issue on my local test install.
I have set the next reply to private which means only you and I have access to it.
Can you please send me duplicator installer.php file.
In addition to this - Can you please tell me if any specific settings I need to set for broadcast plugin?
I have set the next reply to private which means only you and I have access to it.
hidden link
I think the default Broadcast Plugin settings would be fine if you just try to broadcast the default post type.
Here's a screenshot of the 3rd party compatibility settings:
hidden link
I see the database is of around 650 MB and I do not able to install it on my local test instlal. Is there any other way I can able to reproduce the issue?
Or
What if I create a multisite test install on my localhost and you send me the broadcast plugin and exact steps I need to follow to reproduce the issue?
With the third try, it looks like I manage to install your site on my local test install.
I edit the following post and with edit screen with the broadcast option available with right sidebar metabox I selected one site and click on publish - I do not see the error you shared:
=> hidden link
Can you please tell me where I can see the error or I'm following the correct steps?
Please take a look at wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php, line 69
maybe i've commented out the throwing of an exception.
No - the code line you asked me to check is not commented but can you please confirm this:
PHP Fatal error: Uncaught InvalidArgumentException: incorrect post type
- You see the above fatal error when you broadcast post to multiple sites (more than one site) and if you broadcast the post to single site you do not see the above fatal error.
i see the error every time i broadcast. It does not matter to how many sites i want to broadcast.
Thank you for the information. Please allow me to escalate this issue to our next level support. This looks like a compatibility issue and I will keep you posted the further updates as soon as I know more.
I wanted to jump in here notifying you that while we narrowed down what happens, we are not yet clear about why and where.
Most likely, this will require fixes on the Broadcast plugin which integrates with Toolset (I did not know that)
You will, however, be notified here, by Minesh, if this is the case.
Right now, there are other plugins producing the same issue as well and I am investigating this.
https://toolset.com/forums/topic/as-editor-publish-post-fatal-error-invalid-post-type/
https://toolset.com/forums/topic/error-by-sync-of-woocommerce-products-with-wc-multistore-plugin/
As soon I am back from weekend (next Wednesday) we will proceed the debug on this issue and hopefully be able to solve it within Toolset directly.
You will get updated adequately. For now, the only solution seems to not have any Custom Field in the post that is broadcasted and that is not really the goal here.
Can I ask since how long this happens BTW?
That might point us to the direct core issue 🙂
Hi Beda. I hope you will find and solve the problem.
Sorry, but i can't say since when this problem happens. The Project is in development since January and since then broadcasting and toolset is a part of it. Because we've imported the most contents, and then let the broadcast plugin find the 'children', we started manually broadcasting late. On 24-May-2019 i've experienced some similar problems which i've reported to the broadcast developer. since we could not solve them the next step was to contact your support.
Ok - I will keep you posted once I get any update from Beda.
Our devs are in contact with the plugin Developer. You should also contact the plugin developer and ask them and check that we send an email to them and we are looking for their positive reply so we should work together and resolve the issue.