Skip Navigation

[Resolved] GiveWP and Toolset conflict

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.

This topic contains 21 replies, has 3 voices.

Last updated by Christopher Amirian 1 year, 2 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2600829

I am trying to:
Delete a failed or abandoned (or any) donation in GiveWP

Link to a page where the issue can be seen:
in WP Admin, Donations->Donations then choose a donation and try to delete.

I expected to see:
The donation deleted.

Instead, I got:
Your site is experiencing a technical issue.

If I disable Toolset. I can delete donations properly.

Toolset has not been used with any of GiveWP's post types or taxonomies. It is used for other things on the site.

This happens on multiple sites, not just this one.

GiveWP is available for free in the WordPress repository. This site uses some premium add-ons but I don't believe they matter for this error.

#2601171

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

We have a report regarding the GiveWP and Toolset compatibility. Would you please check and see if it is the same scenario?

https://toolset.com/errata/conflict-with-givewp-prevents-custom-field-meta-boxes-being-shown-on-post-edit-screens/

If no, I created a clean installation of WordPress, Toolset and GiveWP. I'd appreciate it if you replicate the issue there and give us the steps to check ourselves:

hidden link

Thank you.

#2601243

On the surface that sounds like a different issue but the underlying cause could be the same.

I will try to setup the scenario on your sandbox server tomorrow.

#2601263

I imported some donations and cannot reproduce the error. The PHP version may be an issue. Can you change the sandbox site to PHP 8.1?

#2601267

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Thank you. I moved the same website to a server that uses PHP 8:

hidden link

Would you please check and see if you can replicate the problem there?

Thanks.

#2601275

Interesting. No error but if I look in Donations->Tools->System Info, it says it is still on PHP 7.4.33.

Looks like it isn't on PHP 8 yet.

#2601513

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Thank you. Yes for some reason we had to enable PHP 7 for that server too. I moved the website to another server which uses PHP 8.

Would you please check?

hidden link

Thanks.

#2602647

Same problem on PHP 8. Donations->Donations then try to delete any donation. Critical error.

#2602741

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Thank you very much, I escalated this to second-tier support. I will get back to you as soon as I have an update.

Thanks.

#2602821

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I have an answer:

- Access your website files via FTP.
- Go to this file: wp-content/plugins/toolset-blocks/backend/Services/ViewParsingService.php
- Change the function scan_for_view_before_deletion on line 213.
- Change this:

		if ( count( $data ) > 0 && $data[0]['general']['preview_id'] != $post_id ) {

- To this:

		if ( is_array( $data ) && count( $data ) > 0 && $data[0]['general']['preview_id'] != $post_id ) {

See if it fixes the issue. This will be fixed in upcoming releases of Toolset Blocks plugin.

Thank you.

#2602823

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I have an answer:

- Access your website files via FTP.
- Go to this file: wp-content/plugins/toolset-blocks/backend/Services/ViewParsingService.php
- Change the function scan_for_view_before_deletion on line 213.
- Change this:

		if ( count( $data ) > 0 && $data[0]['general']['preview_id'] != $post_id ) {

- To this:

		if ( is_array( $data ) && count( $data ) > 0 && $data[0]['general']['preview_id'] != $post_id ) {

See if it fixes the issue. This will be fixed in upcoming releases of Toolset Blocks plugin.

Thank you.

#2602839

Yes, that does fix the issue on the test site. I need this fix on several client sites so I'll wait for the official toolset blocks update for the live sites.

#2603759

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Thanks. As there is no set date at the moment for the future release we suggest that you follow the workaround for now to avoid interruption on your current workflow.

Thank you.

#2625071

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Scott

I wanted to share some feedback with you from the developers. They have marked the ticket as won't fix, as the issue arises in the GiveWP codebase, whereby they use a core WordPress filter to modify the behaviour of the core get_post_meta function such that it returns an empty string rather than false, as documented by WordPress itself.

Our developers decided not to modify our code to catch possible scenarios where other plugins break core WordPress behaviour.

We reported our findings to GiveWP authors who will look into it as part of their work on PHP 8 compatibility (with prior PHP versions it would have produced nothing more than a warning), but I don't know when that will translate into an update.

You can keep using the workaround shared above in the meantime, but bear in mind that if you update Blocks it will overwrite the changes.

#2625073

Thanks Nigel. Hopefully GiveWP will fix this before Toolset Blocks needs an update. I have a good relationship with the team at GiveWP so I'll contact them and see if I can get some priority on this issue.

Scott

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