This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 11 replies, has 3 voices.

Last updated by Bobby 5 months, 3 weeks ago.

Assigned support staff: Bobby.

Author Posts
July 5, 2018 at 12:51 pm #2467332

guenterG

I am using WooCommerce and WooCommerce Bookings

Whenever I add a booking manually (in Admin-Dashboard) the following message appears on screen (note: I removed the server-paths):

Fatal error: Uncaught Error: Call to a member function get_id() on boolean in /…/wp-content/plugins/woocommerce-multilingual/compatibility/class-wcml-bookings.php:2464 Stack trace: #0 /…/wp-includes/class-wp-hook.php(288): WCML_Bookings->translate_booking_confirmed_email_texts(978) #1 /…/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 /…/wp-includes/plugin.php(515): WP_Hook->do_action(Array) #3 /…/wp-content/plugins/woocommerce/includes/class-wc-emails.php(162): do_action_ref_array('woocommerce_boo...', Array) #4 /…/wp-includes/class-wp-hook.php(286): WC_Emails::send_transactional_email(Array, Object(WC_Booking)) #5 /…/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #6 /homepages/7/d387450805/htdocs/GDGolf in /…/wp-content/plugins/woocommerce-multilingual/compatibility/class-wcml-bookings.php on line 2464

The booking itself seems to be o.k.

Frontend booking seems to be working without the error.

July 5, 2018 at 1:59 pm #2467676

guenterG

Also I just noticed that in the "WooCommerce Multilingual" tab it says there are "no products" found, as well as no categories and "no attributes".

However I already have those things and I already have translated them (not using the "WooCommerce Multilingual" tab though).

When I add a new product or a new shop category or a new shop attribute it shows up in "WooCommerce Multilingual".

It seems all the Woocommerce-translations, which are already in place, have been "un-registered" from the "WooCommerce Multilingual" itself.

I don't know if this is related to the above error but it seems likely. How do I fix this (without having to add all the products, categories and attributes a second time).

July 5, 2018 at 3:02 pm #2467995

guenterG

I was able to resolve the issue of my second posting by basically saving and updating the products, categories and attributes. They now show up in "Woocommerce Multilingual" again and I am able to edit them normally.

However: The first issue seems to not be connected to it because it still happens.

July 6, 2018 at 7:06 am #2469798

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

For being of bettter help, can you please provide you WPML Debug information in the debug field below? http://wpml.org/faq/provide-debug-information-faster-support/

Also if possible please verify that you are using the latest versions of your plugins.

I would additionally need to see the detail of the error log. You can see how to enable debug logging here:
https://wpml.org/documentation/support/debugging-wpml/

Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);

Edit your wp-config.php file and add these lines, just before it says 'stop editing here':

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

This will create an error_log.txt file in your site's root directory. Please send me its contents.

July 9, 2018 at 1:02 pm #2476372

marcelD-6

This same issue occurs on my site. If it is possible to post solution?

July 9, 2018 at 9:15 pm #2477867

guenterG

All plugins are up to date afaik. I added WMPL debug information. I activated the error reporting and created two manual bookings. The corresponding lines in the debug file are as follows (note: full URL redacted):

[09-Jul-2018 21:00:40 UTC] PHP Fatal error:  Call to a member function get_id() on boolean in (…)/wp-content/plugins/woocommerce-multilingual/compatibility/class-wcml-bookings.php on line 2464
[09-Jul-2018 21:03:05 UTC] PHP Fatal error:  Call to a member function get_id() on boolean in (…)/wp-content/plugins/woocommerce-multilingual/compatibility/class-wcml-bookings.php on line 2464
July 11, 2018 at 12:09 am #2484781

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

At the moment there are no known issues with this similar error which makes me believe there is high chance of this being related to compatibility issue.

if possible please do the following compatibility test and let me know your results

please test this:
-Back up your site first
-Deactivate all non WPML related plugins
-Switch for a moment to a WordPress default theme like Twenty Fourteen.
-If the issue is gone, activate one by one to see with wich one there is an interaction issue

Let me know your results please.

@marceld-6 please feel free to do the same test as mentioned above or subscribe in this thread to be notified once a solution has been provided but if you require immediate assistance please open a new thread and we will be able to assist you.

July 11, 2018 at 9:16 am #2485706

guenterG

I was able to pin down the problem. It is not a compatibility issue with other plugins/themes. Rather it seems indeed to be one between WooCommerce and WMPL.

• The problem DOES occur when you add a new booking in Dashboard and choose the option "Don't create an order for this booking." (as you would most likely do when adding bookings manually)
• The problem DOES NOT occur when you choose the option "Create a new corresponding order for this new booking…"
• The problem DOES NOT occur when you choose the option "Assign this booking to an existing order with this ID"

I tested this with other plugins disabled/enabled and default WP-theme/my theme. Results are the same.

Perhaps @marceld-6 can confirm my findings.

July 11, 2018 at 7:51 pm #2488052

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

Thank you for updating me !

What do you use to add these bookings ? is this from WooCommerce Bookings ?

if so then this might be a compatibility between WPML and WooCommerce Bookings rather than Woocommerce.

if possible i would like to take a closer look and try to replicate this locally

July 19, 2018 at 9:54 am #2534371

guenterG

Yes, of course this is from WooCommerce Bookings. That's what I meant.

You can take a look at it from my test site. Please refer to this thread and its moderator to obtain access and/or a duplicator package:
https://wpml.org/forums/topic/not-allowed-to-delete-booking-from-trash/

July 19, 2018 at 6:40 pm #2535376

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

i was able to replicate the issue on my local enviroment

I escalated this thread to our 2nd tier support and they will take a look at this issue.

You will be notified as soon as new information is available.

April 30, 2019 at 10:09 pm #3715067

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Issue should be resolved now in the latest versions

https://wpml.org/downloads/