Skip Navigation

[Resolved] Fatal error: Uncaught Error: Class 'Toolset_WPML_Compatibility'

This support ticket is created 3 years, 5 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 21 replies, has 2 voices.

Last updated by simonM-5 3 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#2077289

Dear Support

I recently started using the plugin "WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Labels (Pro)", since it appears to be the only WPML-compatible PDF invoicer for WooCommerce according to the WPML site.

However when we click the button to generate the invoice from the front end, we get the following error:

Fatal error: Uncaught Error: Class 'Toolset_WPML_Compatibility' not found in .../wp-content/plugins/types-access/application/controllers/custom_errors.php:297 Stack trace: #0 .../wp-content/plugins/types-access/application/models/wpml_settings.php(489): OTGS\Toolset\Access\Controllers\CustomErrors->get_custom_error(0) #1 .../wp-includes/class-wp-hook.php(292): OTGS\Toolset\Access\Models\WPMLSettings->check_language_edit_permissions(Array, Array) #2 .../wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array) #3 .../wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(2912): apply_filters('wpml_active_lan...', Array, Array) #4 .../wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php(94): SitePress->get_ls_languages(Array) #5 .../wp-content/themes/Avada/includes/lib/inc/class-fusion-multilingual.php(280) in .../wp-content/plugins/types-access/application/controllers/custom_errors.php on line 297

From the error message I would assume it is some kind of error with Toolset Access, but it may also be a WPML issue.

The issue can be reproduced as follows (please request a private reply if necessary for a test login):
1) Sign in as user
2) Click the shopping trolley icon in menu to access WooCommerce Account page
3) Click Subscriptions and click any Subscription number to drill to order details. Here the "Print Invoice" button causes the error described.
4) Additionally, if you drill down on the Order number, both "Print Invoice" and "Download Invoice" buttons cause the described error.

It seems as if Toolset Access is blocking the generation of the PDF.

However, in WP back end, I can generate the invoice successfully, by choosing WP Admin > Invoice/Packing > Invoice > Customise > Preview sample PDF link top right, so the PDF invoicing plugin appears to be able to generate invoices successfully, just not from the front end. I couldn't find anywhere in Toolset Access settings to allow/disallow any functionalities from 3rd party plugins.

Please advise on how to proceed.

Thanks and best regards
Simon

#2077379

Shane
Supporter

Languages: English (English )

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

Hi Simon,

Thank you for getting in touch.

I've setup a sandbox site below for us to go through the issue to see if we can replicate on a fresh install to eventually submit to our 2nd tier team for further checks.

Click the link below.
hidden link

This will allow you to setup the basics for us to replicate on a clean site.

Please let me know if you're able to replicate the issue on this sandbox site.

Thanks,
Shane

#2077905
Screenshot 2021-06-05 at 14.47.01.png

Hey Shane

Hope you're well.

When I use that link I'm getting the attached screenshot.

You're welcome to use the Duplicator Pro plugin on our site (it's still a dev site) to make a copy of our site and work on it locally if you want. Probably easier for both of us. Please be sure to deactivate the plugin WordFence on the duplicate site, otherwise we get hammered with emails.

The user you use to test must be of role "Subscribed Family" otherwise you will not be able to see the relevant pages as I detailed in the steps to reproduce. You can use the following test login on our site if you prefer to test directly. You have FTP access already so you can pick up any debug.logs you need: (Please delete this info from the post when you have read it! ).

Thanks and regards
Simon

#2079361

Shane
Supporter

Languages: English (English )

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

Hi Simon,

I'm currently creating the package. I will provide an update onces available.

Thanks,
Shane

#2079381

Shane
Supporter

Languages: English (English )

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

Hi Simon,

I'm having some issues where the duplicator plugin isn't allowing me to download the package.

Can you download and upload it to Google Drive or Dropbox and share it with me ?

Thanks,
Shane

#2080143
#2080881

Shane
Supporter

Languages: English (English )

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

Hi Simon,

Just an update here, I was successfully able to copy the site to my localhost.

I'm currently performing some more tests but will provide an update soon.

Thanks,
Shane

#2083745

Shane
Supporter

Languages: English (English )

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

Hi Simon,

I wasn't able to replicate the issue on a clean install, which would mean that whatever is happening is unique to your site.

What I did was to submit a copy of your site as well to our 2nd tier team for further checks.

Once there is a response I will provide an update for you.

Thanks,
Shane

#2084719

Shane
Supporter

Languages: English (English )

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

Hi Simon,

Our 2nd tier team had a look at this and was able to get it working. Mainly we found the issue only occurs when the Avada theme is active.

There isn't much we can do here because we are unable to replicate the issue even when we placed the avada theme on our sandbox site that you can check out below.
hidden link

Here is the my account page below.
hidden link

The problem seems to be specific to your setting up of the settings in the theme since a fresh copy doesn't produce the same result.

Also I see that your theme is outdated so I would recommend updating to the latest version of the Avada theme as well.

Thanks,
Shane

#2088055

HI Shane

We updated our theme to the latest 7.4 and have applied all the patches. We have run into to a bug with the WC Add to Cart functionality which means that we cannot add anything to our basket at the moment. So I cannot yet verify if this is working in Avada 7.4.

I will get back to you once the issue is resolved.

Kind regards
Simon

#2088057
Screenshot 2021-06-14 at 09.23.43.png

Hi Shane

Also, I am unable to access those links you sent me - they just result in the attached screenshot.

Kind regards
Simon

#2088089

Hi Shane

I can now confirm the Download Invoice and Print Invoice works on the 2021 Theme. When I activate Avada or Avada Child this no longer works.

Can you guys help to identify what the conflict with Toolset Software is? It looks to me like a Toolset Access issue or a WPML issue.

Kind regards
Simon

#2088443

Shane
Supporter

Languages: English (English )

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

Hi Simon,

This is not an issue between Toolset Access and WPML. Its more on the case of your specific install. As i've noticed that even when i've enabled the Avada theme on our test site it will still produce an invoice.

Were you able to resolve the issue regarding the Avada 7.4 ?

I will try to assist as best as possible but it can be difficult since its not replicable on a fresh install.

Thanks,
Shane

#2088575

Hi Shane

We are still having exactly the same issue on Avada 7.4.

I have opened a support request with the plugin author (webtoffee) for assistance also.

I'll keep you posted if as soon as I get an update from them.

Kind regards
Simon

#2089289

Hi Shane

After getting some feedback from the plugin author, he asked us to deactivate WPML and try it. It worked fine with WPML deactivated, so indeed WPML seems to be the culprit.

I'll keep you posted, but maybe you or your WPML colleagues may be able to shed some light on what the issue could be.

Thanks and regards
Simon