Skip Navigation

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: 

This topic contains 32 replies, has 3 voices.

Last updated by Nigel 1 year, 8 months ago.

Assisted by: Nigel.

Author Posts
May 8, 2023 at 10:13 am #13604137

louisN-4

Undefined index: GBP.JSON + Trying to access array offset on value of type null

we sometimes get this and sometimes several hours without this

we don't know the reason, and we would like yout to examine our backend so you can check why this happens

please convert ths chat to a forum ticket

[08-May-2023 09:32:33 UTC] PHP Notice: Undefined index: ILS.JSON in /home/kidenoad/domains/kideno.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php on line 447
[08-May-2023 09:32:33 UTC] PHP Notice: Trying to access array offset on value of type null in /home/kidenoad/domains/kideno.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php on line 449
[08-May-2023 09:32:33 UTC] PHP Notice: Trying to access array offset on value of type null in /home/kidenoad/domains/kideno.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php on line 451
[08-May-2023 09:32:33 UTC] PHP Notice: Trying to access array offset on value of type null in /home/kidenoad/domains/kideno.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php on line 455
[08-May-2023 09:32:33 UTC] PHP Notice: Trying to access array offset on value of type null in /home/kidenoad/domains/kideno.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php on line 472
[08-May-2023 09:32:33 UTC] PHP Notice: Trying to access array offset on value of type null in /home/kidenoad/domains/kideno.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php on line 476
[08-May-2023 09:32:33 UTC] PHP Notice: Undefined index: GBP.JSON in /home/kidenoad/domains/kideno.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php on line 447
[08-May-2023 09:32:33 UTC] PHP Notice: Trying to access array offset on value of type null in /home/kidenoad/domains/kideno.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php on line 449
[08-May-2023 09:32:33 UTC] PHP Notice: Trying to access array offset on value of type null in /home/kidenoad/domains/kideno.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php on line 451
[08-May-2023 09:32:33 UTC] PHP Notice: Trying to access array offset on value of type null in /home/kidenoad/domains/kideno.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php on line 455
[08-May-2023 09:32:33 UTC] PHP Notice: Trying to access array offset on value of type null in /home/kidenoad/domains/kideno.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php on line 472
[08-May-2023 09:32:33 UTC] PHP Notice: Trying to access array offset on value of type null in /home/kidenoad/domains/kideno.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php on line 476

May 8, 2023 at 10:28 am #13604371

louisN-4

please open me debug box + i will submit admin link

May 8, 2023 at 11:13 am #13604769

Subash Chandra Poudel

Hi there,

I have enabled the Debug info and private reply for you to share the Debug info and site credentials safely.

Please make sure to backup the site completely to prevent any data loss or issues. Additionally we will also need your permission to add/remove plugins/settings on the site or copy the site to our test environment using plugins like Duplicator ( https://wordpress.org/plugins/duplicator/ ).

Regards,
Subash

May 8, 2023 at 2:31 pm #13606635

louisN-4

i keep getting more and more of the errors i showed you above, it doesn't stop

do you want to tell me what to do, or you are able to resolve it by yourself?

May 9, 2023 at 10:44 pm #13617861

louisN-4

I AM paying HUNDREDS of dollars a month to WPML

any reason why i get such a slow service?

i am still having this issue

May 12, 2023 at 8:29 am #13635057

Nigel
Supporter

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

Hi there

Sorry for the delay in someone getting to this ticket, I will handle it from now.

I have access to your production site, but I can't test on that, as at a minimum I'll need to deactivate most of the plugins on your site and switch theme and disable caching to try and isolate the cause of the problem.

Do you have a staging server I could use for testing? If not can I make a copy of the site on another server?

Do you have any information about the steps that trigger the issue? (I'm guessing that you are simply seeing the notices in your debug logs and don't know what prompts them, but if you know that it involves some workflow, please let me know.)

May 13, 2023 at 10:51 pm #13641661

louisN-4

hi nigel, thanks for taking over

you don't need to disable any plugins on our site, as it functions ok

we have this ticket: https://wpml.org/forums/topic/slow-down-on-mass-price-update/page/8/#post-13632181

however i will create a copy of our production now to staging and please open a box so i can share with your details

that is being managed by your most senior tech personal, so the site is fine,

you just need to see what specifically ignite this error, and tell us or fix it yourself

May 15, 2023 at 7:37 am #13645105

Nigel
Supporter

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

OK, I've set up a private reply for you to share details of the staging server.

Although your site is functioning okay, it is generating these notices in the logs, and to be able to try and isolate the cause I will need to do things like disable plugins and switch theme, as well as possibly installing some debugging tools.

May 15, 2023 at 12:33 pm #13647893

Nigel
Supporter

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

Could I get FTP access, please?

Ordinarily I would just use a file manage plugin to be able to check the files on your server—including the debug.log—but your server doesn't seem to permit such plugins, they don't work on this staging site.

I did add a plugin to check the debug.log, but it only shows the most recent 50 items, all of which are notices from other plugins or your theme, not the notices you reported above that I'm trying to investigate.

I have set another private reply to get those FTP details.

May 16, 2023 at 7:54 am #13652973

Nigel
Supporter

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

Thank you for those. The file.io link has been deleted so I can't see your production log.

On the staging server the debug.log contains lots of notices from other plugins—font and caching plugins—but not the issue that you reported.

I have been navigating the site, adding products to the cart, switching language, switching currency, but haven't been able to do anything that triggers the PHP notices you shared above.

(The one thing I didn't do was complete the checkout process and pay for goods.)

We need to be able to identify some steps that trigger the notices to be able to understand the cause.

Might I suggest that on your production server you add an activity monitor plugin to record all of the actions that are taken on your site. Then it may be possible to compare the exact time the PHP notices are generated with details of what actions were being taken on the site at the same time from the activity log, to give an indication of the steps we can use to try to reproduce the issue.

If you could please try that and let me know what you find.

May 16, 2023 at 10:13 am #13654999

louisN-4

staging = staging obviously, its never going to be exactly like production

but you can also see the production debug.log, or you need me the path on the ftp?

we have activity log for admin activity, i think for users activity it would slow the site dramatically

May 16, 2023 at 12:04 pm #13656071

Nigel
Supporter

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

The activity logging would be a temporary measure to help identify what action triggers the notices.

I need some steps to be able to trace what happens that results in the notice to identify the cause.

Your original post shows the PHP notices, but without a stack trace, so there is currently no clue as to why the notices are being triggered.

I've located the production server and checked the debug.log with FTP.

It only has entries covering a few hours this morning, but all of the notices are other notices from other plugins and your theme, not the notices you reported above.

I'll return to it later to see if it updates with those same notices.

May 16, 2023 at 12:06 pm #13656105

louisN-4

the activity is not the solution and definetly not agreeable

1. these errors are not instant, some hours pass and no log notice/error, and then sometimes those errors/notices come in batches

i suggest you consult someone else in your team about this, since it seems you are praying in the dark, where i am sure other agents of wpml, have had this issue, since i saw some users complaining about such things in other support cases.

May 16, 2023 at 1:24 pm #13656797

Nigel
Supporter

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

I had already checked our internal tickets and the forum for any other cases reporting the same PHP notice, but found nothing.

If you have seen a forum thread with the same issue, please share the links with me so I can check them, they may have useful details.

For now, I have no information about the steps to reproduce the notices, nor details of the PHP stack when the notices are triggered, only the notices themselves.

It is clear what the proximate cause of the notice is—the function apply_rounding_rules is being passed the variable $currency, which should be a currency code but is instead a currency JSON object—but without the stack trace or reproduction steps to be able to monitor the code execution we can't say why $currency is being passed wrongly.

One thing we can try is I can edit the plugin file where the notice is generated and manually create a stack trace to output to the debug.log, so that there will be details of how the function was called.

It would be a minor edit that I would leave in place only until the notices re-appear in the debug.log, which should give some clues as to what triggered them.

Would that be okay?

May 16, 2023 at 9:11 pm #13659753

louisN-4

"It is clear what the proximate cause of the notice is—the function apply_rounding_rules is being passed the variable $currency, which should be a currency code but is instead a currency JSON object—but without the stack trace or reproduction steps to be able to monitor the code execution we can't say why $currency is being passed wrongly."

if you mean the wpml file, then i agree

just check several product pages afterwards, so that we don't have any errors on the site