Skip Navigation

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

Problem:
I just found out that with acitvated "WooCommerce Multilingual & Multicurrency"-Plugin I get this error

Error thrown
Call to a member function get_id() on null

when trying to use Woocommerce's lost-password-function.
Solution:
The plugin "Kadence WooCommerce Email Designer" seems to be the culprit.

Upgrading the plugin to the latest version resolves this issue

Relevant Documentation:

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.

Our next available supporter will start replying to tickets in about 3.33 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by andreasK-96 1 year, 7 months ago.

Assisted by: Bobby.

Author Posts
August 29, 2022 at 9:58 pm #11952947

andreasK-96

Hi there,

I just found out that with acitvated "WooCommerce Multilingual & Multicurrency"-Plugin I get this error

Error thrown
Call to a member function get_id() on null

when trying to use Woocommerce's lost-password-function.

Any idea who to solve this?

Best regards
Andi

August 30, 2022 at 2:43 am #11953561

Bobby
Supporter

Languages: English (English )

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

Hello,

I would need to see the detail of the error. 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__) . 'https://cdn.wpml.org/error_log.txt');

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

August 31, 2022 at 7:25 am #11961683

andreasK-96

Hi Bobby!

Thanks for having a look!
Here is the content of the error log:

[31-Aug-2022 07:16:22 UTC] PHP Warning: Cannot modify header information - headers already sent in /www/htdocs/w01291bf/trachtenstrip.de/wp-content/plugins/litespeed-cache/src/vary.cls.php on line 729
[31-Aug-2022 07:17:11 UTC] PHP Notice: Undefined variable: comment_ID in /www/htdocs/w01291bf/trachtenstrip.de/wp-content/plugins/my-custom-functions/inc/php/functional.php(103) : eval()'d code on line 29
[31-Aug-2022 07:17:11 UTC] PHP Notice: Trying to get property 'comment_author' of non-object in /www/htdocs/w01291bf/trachtenstrip.de/wp-content/plugins/my-custom-functions/inc/php/functional.php(103) : eval()'d code on line 38
[31-Aug-2022 07:17:11 UTC] PHP Warning: Cannot modify header information - headers already sent in /www/htdocs/w01291bf/trachtenstrip.de/wp-content/plugins/litespeed-cache/src/vary.cls.php on line 729
[31-Aug-2022 07:17:11 UTC] PHP Notice: Undefined variable: comment_ID in /www/htdocs/w01291bf/trachtenstrip.de/wp-content/plugins/my-custom-functions/inc/php/functional.php(103) : eval()'d code on line 29
[31-Aug-2022 07:17:15 UTC] PHP Notice: Undefined variable: comment_ID in /www/htdocs/w01291bf/trachtenstrip.de/wp-content/plugins/my-custom-functions/inc/php/functional.php(103) : eval()'d code on line 29
[31-Aug-2022 07:17:15 UTC] PHP Notice: Trying to get property 'comment_author' of non-object in /www/htdocs/w01291bf/trachtenstrip.de/wp-content/plugins/my-custom-functions/inc/php/functional.php(103) : eval()'d code on line 38
[31-Aug-2022 07:17:15 UTC] PHP Notice: Undefined variable: comment_ID in /www/htdocs/w01291bf/trachtenstrip.de/wp-content/plugins/my-custom-functions/inc/php/functional.php(103) : eval()'d code on line 29
[31-Aug-2022 07:17:17 UTC] PHP Warning: Cannot modify header information - headers already sent in /www/htdocs/w01291bf/trachtenstrip.de/wp-content/plugins/litespeed-cache/src/vary.cls.php on line 729
[31-Aug-2022 07:17:28 UTC] PHP Notice: Undefined variable: comment_ID in /www/htdocs/w01291bf/trachtenstrip.de/wp-content/plugins/my-custom-functions/inc/php/functional.php(103) : eval()'d code on line 29
[31-Aug-2022 07:17:28 UTC] PHP Notice: Undefined variable: comment_ID in /www/htdocs/w01291bf/trachtenstrip.de/wp-content/plugins/my-custom-functions/inc/php/functional.php(103) : eval()'d code on line 29
[31-Aug-2022 07:17:45 UTC] PHP Warning: Cannot modify header information - headers already sent in /www/htdocs/w01291bf/trachtenstrip.de/wp-content/plugins/litespeed-cache/src/vary.cls.php on line 729

It seems like only litespeed cache and php-my-functions-plugin cause errors... I deactivated them both, but the Error thrown-issue still persists. Only when I decativate WooCommerce Multilingual & Multicurrency-Plugin it's gone and I can retrieve a new password...

Regards
Andi

August 31, 2022 at 8:26 pm #11967557

Bobby
Supporter

Languages: English (English )

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

Hi Andi,

Thank you for sharing the error logs

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

September 2, 2022 at 2:03 am #11974757

Bobby
Supporter

Languages: English (English )

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

Thank you for the access details!

When I attempt to access the login details are not working.

Screen Shot 2022-09-01 at 7.02.55 PM.png
September 2, 2022 at 7:29 am #11976143

andreasK-96

Sorry, wrong login... Please use this one: (And please hide URL if anyone else can see this...)

September 2, 2022 at 7:29 pm #11979433

Bobby
Supporter

Languages: English (English )

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

Thank you, the URLs are hidden by default, however, I will remove it as well.

I have reviewed the backend and can reproduce the issue, do I have your permission to install the Duplicator plugin to further debug this issue locally?

I will need to deactivate/activate plugins and test in a minimal environment which is best done on a local or staging environment and not a live one.

September 2, 2022 at 8:21 pm #11979629

andreasK-96

Feel free, this staging site is only for you. 😉
You can activate and deactivate there whatever you want.

September 3, 2022 at 12:56 am #11979897

Bobby
Supporter

Languages: English (English )

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

Thank you for confirming that!

I proceeded and test on the staging environment, then.

The plugin "Kadence WooCommerce Email Designer" seems to be the culprit.

Deactivating will no longer cause this issue even when WCML is enabled.

Let me know your results, please.

September 5, 2022 at 10:35 am #11988635

andreasK-96

Thank you! They just released an update and now everything is working again. 🙂

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