Skip Navigation

[Resolved] Conflict with Broadcast Plugin

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

Problem:
There is a problem when using the Broadcast Plugin and Toolset Types - when broadcasting, a Fatal error happens and the site is neither broadcasted, nor can we delete already broadcasted pages.
The error is

PHP Fatal error: Uncaught InvalidArgumentException: incorrect post type in /types/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php:69

Solution:
This should be resolved in any latest Broadcast Plugin updates, if not yet available the Author of the Broadcast Plugin can provide the patch.

NOTE

If you see the same error but do not use Broadcast plugin, maybe you use Multisite Post Duplicator
Please open a ticket with us and Multisite Post Duplicator in the case, so we can work on adjustments there as well.

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

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

Tagged: 

This topic contains 12 replies, has 3 voices.

Last updated by Beda 4 years, 6 months ago.

Assisted by: Beda.

Author
Posts
#1342173

Hi, this morning I posted a message in a thread about a conflict between Toolset and ThreeWP Broadcast Plugin. Since the thread is marked as solved - though the issue seems still present - I'm copying my message in a new ticket because, otherwise, I fear the support staff will not read it (https://toolset.com/forums/topic/fatal-php-error-if-i-broadcast-articles-to-other-sites-multisite/page/2/#post-1341873). Here it is:

After updating Toolset and Broadcast plugins one week ago, my multisite hidden link is giving me errors when I try to save a post after unlinking it to a previously linked child blog. The opposite action instead - adding a broadcast to a previously unlinked child blog - gives no issues. Are you still in contact with Broadcast's plugin author to solve this recent compatibility issue? My multisite worked fine for more than two years before this update...

Here is the WP_debug error message if it can be helpful:

Notice: Constant WP_POST_REVISIONS already defined in /www/wp-content/plugins/perfmatters/inc/functions.php on line 267 Fatal error: Uncaught InvalidArgumentException: incorrect post type in /www/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php:69 Stack trace: #0 /www/wp-content/plugins/types/application/models/field/group/repeatable/service.php(605): Toolset_Field_Group_Post->__construct(Object(WP_Post)) #1 /www/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(409): Types_Field_Group_Repeatable_Service->group_contains_rfg_or_prf(141) #2 [internal function]: Toolset_Field_Group_Post_Factory->{closure}(Object(OTGS\Toolset\Common\Field\Group\GroupDisplayResult)) #3 /www/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(286): array_filter(Array, Object(Closure)) #4 /www/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/post_factory.php(458): Toolset_Field_Group_Post_Factory->filter_groups(Array, Array, Array) #5 /www/wp-content/plugins/types/vendor/toolset/types/embedded/i in /www/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/post.php on line 69
The website is having technical issues. Check the site administrator's inbox for instructions.

Thanks,
Nicola

#1342199

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nicola,

I see where this one is still escalated.

From what I can see our team has been in contact with the plugin developer to get this one resolved.

A few suggestions were made to the developer but i cannot say if the developer has implemented these changes.

So I can say that this one is still in progress.

Thanks,
Shane

#1342209

Thank you Shane, I'm going to write to the Broadcast plugin developer to see if he can get in touch with your team. In the meantime I'd keep this thread open: if he gives me some indications for you I'll write them here.

Thanks,
Nicola

#1342241

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nicola,

No problem. Please let me know as soon as he provides an update.

Thanks,
Shane

#1344801

Hello, I have received the email from the BroadCast Plugin but unfortunately as I mentioned before in all other tickets, A) an old API is used in that plugin and B) we are not able to replicate this problem without "hacking" the databases (means, it is not replicable easily on a clean fresh install with clear steps, but only by manually "destroying" or altering data in the database, or of course, on certain duplicates we received).

Do you know the exact steps that lead to this issue?
I see you mention the update, did you update to any Toolset Types version above 3.0 when this started happen?
If so, it's clearly due to the API used in that Plugin, which will work only with pre-Types 3-0 Relationships, but not newer.

We know what the technical error is, the MS Site ID gets mixed up and does not port to our code, which gets touched while you broadcast posts.
However there is A) no reason for the code to be even touched and B) no reason for the Site ID's to get mixed up, unless the Broadcast Plugin here pushes wrong data.

The Author asked me to offer some solutions to unhook everything that Toolset does on save_post so to let his plugin run, but this will not be a viable solution, since there is not just one major hook to remove, there are several added to the save_post action.

I am currently working once again on this, I would appreciate it immensely if you could:
- provide clear steps that lead to the issue if you know them
- let me know what precise update was culprit, and if the issue is gone when reverting to that version
- finally, provide a copy of your site, if possible, so we can look at it?

Maybe users reported the problem but none of them was returning to provide required details later.
So I can use every bit of information you can give me

Thanks!

#1344877

Please also check if you use cache mechanisms. Disable those if possible to test, if you use any.

Locally I just saw, that all other users had cache mechanisms and as soon those are disabled, things started to work again.

#1344915

The cache is managed by Flywheel, there are no caching plugins. Anyway we cleared the cache several times via Flywheel's dashboard but the issue remained.

Nicola

#1345001

Flywheel cache is also cache, that could interfere here.

I am trying to download the files, although 6GB may take a while.

I suggest currently no tests on the live site, please await my results.

Note, the author of the plugin as well feedbacked with some updated files which I will try as well.

#1345003

I will have to feedback on this tomorrow as my shift is about to finish, however good news, the package is pulling faster than expected, in about 30 minutes it should be downloaded.

I will then tomorrow deploy it locally (I hope that will be successful 🙂 ) and see what I can find, let's solve this issue once for all

#1345279

I deployed the package and the database, had to remove a few plugins to log in successfully, and wrap a existing WordPress install around what you sent me since that was missing.

I managed to rescue to blogs (main and one other) and make it work on local servers.

I created a new page, and had no issues whatsoever to broadcast it.
I had no error in the console, and the post (page) is broadcasted

I had better luck with a native post.
There I can see the error.

I started disable plugins and as I had suspected as soon every non TOOLSET or BROADCAST plugin is disabled the issue is resolved.

Since you do use cache, both Server and plugins, it might be due to that.

Note however I am still able to see the issue when deleting a broadcasted post, so it's not entirely solved yet.

I will now ask the developers to have a look directly.

#1345293

Please try to upload and replace the existing file on your site (after a backup/testing site) in your Broadcast "threewp-broadcast-premium-pack" plugin under path:
threewp-broadcast-premium-pack/src/toolset

The new file to use instead of the existing toolset.php there:
hidden link

That fixed the issue for me, both when broadcasting and when removing a broadcast.
Can you confirm this?

Please make a backup first or try on a staging site.
I tried on the duplicate, where it worked.

#1346465

Bravo Beda! I uploaded your file and now there are no more broadcast issues. Thanks a lot for your great job! I would also like to thank Edward, author of the Broacast plugin, who worked with you on the problem.
Great, guys!!!

Nicola

#1346875

This is great news.

Please let us know if any other problems pop up.

Could you specifically look after relationships, Repeatable Field Groups and such?
I mean, when you use them, on your site, check if everything works fine.

I'd also like to emphasize that the work done here (coding) is entirely "props to" Edward from the Broadcast plugin and changes will be done there.
I barely tested 🙂 and confirmed the issue as well as shared the insight with Edward.

Thank you for sticking with us!

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