This thread is resolved. Here is a description of the problem and solution.
Problem:
I want to enable wpml string translations and the site is crashing when I do.
[error] 14588#14588: *815 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught WpOrg\Requests\Exception\InvalidArgument: WpOrg\Requests\Cookie::__construct(): Argument #1 ($name) must be of type string, integer given in /data/EW/httpdocs/httpdocs_dsd/wp-includes/Requests/src/Exception/InvalidArgument.php:29
Solution:
Upgrading PHP to version 8+ helped
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.
Tagged: Exception
This topic contains 14 replies, has 2 voices.
Last updated by Nic 1 year, 7 months ago.
Assisted by: Bobby.
Author | Posts |
---|---|
April 25, 2023 at 8:21 am #13531543 | |
Nic |
I want to enable wpml string translations and the site is crashing when I do. stack trace from error log (from dev environment): 2023/04/25 08:05:32 [error] 14588#14588: *815 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught WpOrg\Requests\Exception\InvalidArgument: WpOrg\Requests\Cookie::__construct(): Argument #1 ($name) must be of type string, integer given in /data/EW/httpdocs/httpdocs_dsd/wp-includes/Requests/src/Exception/InvalidArgument.php:29 Can you help me out here? Kind Regards, |
April 26, 2023 at 5:55 am #13537875 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Hi Rick, For being of better help, can you please provide your WPML Debug information in the debug field below? Also, If you have a staging site, what are your results when testing with a minimal environment? There is a possibility a third-party plugin along with WPML might be causing this error. |
April 26, 2023 at 7:16 am #13538303 | |
Nic |
I'm sorry I can't. The debug info button throws a fatal error. So the only info I've got is the stacktrace from php debug log. |
April 26, 2023 at 7:17 am #13538305 | |
Nic |
Actually, without the string translation active I can get debug info and I've posted it above. |
April 26, 2023 at 6:52 pm #13544471 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Thank you, everything looks ok so far, only recommendation is to increase your WP MEMORY LIMIT to 256M or higher as 40M is below our minimum requirements for WPML. I would like to request temporary access (wp-admin and FTP) to your site to test the issue. **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/ 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, |
May 2, 2023 at 9:12 pm #13574189 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Hi Rick, Thank you for sharing the access details! At the moment I am not able to login to the backend. Please verify they are correct. ( I have tried the username with the space and without) |
May 5, 2023 at 6:24 am #13590827 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Thank you for the access details! As I did not have the FTP credentials and the string translation plugin crashes the site I was able to create a duplicator package to test locally. It looks like the theme EWIM is possibly causing this error with WPML. Go to Appearance-> switch your theme to a standard theme temporarily (twenty23 for example) and attempt to enable WPML String Translation, does it work ok? |
May 8, 2023 at 7:40 am #13602563 | |
Nic |
Hey Bobby, thanks for checking. I've tried and it still crashed as soon as I activated the string translation. That was with a clean install for the default twenty23 theme. But I could really use some assistance here. |
May 8, 2023 at 10:18 pm #13609125 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Hi there, I was able to activate WPML string translation on the site by going to Plugins->Add new->Commercial tab-> Install & activate without any fatal errors at the moment. |
May 9, 2023 at 6:59 am #13610057 | |
Nic |
Sorry Bobby, the site still crashed. I'm going to delete the plugin again, and send the stack trace again. I need to give a training on the site this afternoon so please keep that in mind in case you want to re-activate the plugin. stacktrace: |
May 9, 2023 at 6:52 pm #13616791 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Thank you for updating me! Did the site crash at a random time or was there a specific action that showcased the fatal error? For example, viewing a translation or trying to add a translation. When I enabled String Translation I did not get a fatal error. This will help in reproducing this behavior. Thank you! |
May 10, 2023 at 7:09 am #13618697 | |
Nic |
The site crashed when I went back in the back-end. Front end was stable at first, but then once I logged in the dash crashed. Kind regards, |
May 11, 2023 at 4:37 pm #13632141 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Hi Rick, I am migrating a copy of the site to our cloudways servers where we can further test without having to risk your site going down. will update you here as soon as there are updates |
May 22, 2023 at 9:22 am #13687665 | |
Nic |
Hey Bobby, I noticed you were running a different PHP version, so I changed mine. It's working now. PHP needs to be at 8 minimum to run it seems. Cheers and thanks for helping us out. Kind regards, |
May 22, 2023 at 9:23 am #13687669 | |
Nic |
Upgrading PHP to version 8+ helped me fix this issue. |