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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

Tagged: 

This topic contains 22 replies, has 2 voices.

Last updated by alinam-2 1 day, 12 hours ago.

Assisted by: Bruno Kos.

Author Posts
September 18, 2024 at 7:08 am #16191193

alinam-2

Background of the issue:
I am trying to: Hello, I got plenty of errors in logs like this one: Got error 'PHP message: PHP Warning: Undefined array key 0 in /home/1164702.cloudwaysapps.com/sdfdfsd/public_html/wp-content/plugins............ key 17 in /home/1164702.cloudwaysapps.com/sdfs/public_html/wp-content/plugins/wpml-media-translation/classes/class-wpml-media-attachment-by-url-query.php on line 163', referer: hidden link

Symptoms:
Too many reported errors. PHP Warning: Undefined array key 0 and key 17 in wpml-media-translation plugin.

Questions:
How to get rid of the PHP warnings in the logs?

September 18, 2024 at 7:27 am #16191272

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

To troubleshoot this problem, I'll install the Duplicator plugin and generate packages for further debugging purposes. I'll ensure to exclude all media files to maintain a minimal package size. You can find more information about the process here: [link](https://wpml.org/faq/provide-supporters-copy-site/). Please confirm if this approach is acceptable to you.

For this I will need your site credentials.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

I marked your next reply as private so that you can safely add these.

September 20, 2024 at 5:57 am #16201252

alinam-2

ps: The article / post generating the issue:
hidden link

September 20, 2024 at 9:17 am #16201923

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

I am trying to create a Duplicator package hidden link, but right now it is at 39%.

Can you check and if still stuck at that percentage, can you try changing some of these settings hidden link or find another way to create the package?

Make sure to exclude uploads folder as we don't need media files.

September 20, 2024 at 4:19 pm #16203784

alinam-2

Hello,
Sorry, I know nothing on this matter.
You can't look at it on staging site?
Kind regards

September 21, 2024 at 2:53 am #16204313

alinam-2

Hello
You need duplicator pro to complete the migration.
I made an article called Essai WPML
1. Go to WP / articles
2. preview article in new tab. Click on photo to see what it does
3. right click on the + for the article in column of English flag and open in new tab. You will see 2 images + text. Complete the translation. For the image, choose copy the oringal. Close.
as you may notice, here, 1 image is not really considered as an image.
4. right click on the + for the article in column of German flag and open in new tab. 1 of the 2 images is not proposed for translation. Complete the translation. Close.
5. right click on the + for the article in column of English flag and open in new tab. The image is not proposed for translation.
Waiting for your feedback

September 23, 2024 at 1:36 pm #16210106

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

I was able to create a package, however can you tell me if your last message refers to steps to reproduce this issue or is this something else?

September 23, 2024 at 3:22 pm #16210555

alinam-2

Hello,
Yes, this refers to the steps to reproduce the issue.
Indeed, after more investigations, I discovered that it's linked with a specific plugin:
https://wordpress.org/plugins/modal-block/
Let me know if you need more info
Kind regards

September 24, 2024 at 5:59 am #16212399

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

I noticed that the [Modal Block plugin](https://wordpress.org/plugins/modal-block/) hasn't been tested with the last three major releases of WordPress. This suggests it might no longer be actively maintained or supported, and there could be compatibility issues with newer WordPress versions.

Even if we encounter a bug, it's unlikely that the developers will address it.

If you're only using the modal block from this plugin, have you considered exploring alternatives? You can check other options [here](https://wordpress.org/plugins/search/modal+block+gutenberg/).

For example, the [Ultimate Addons for Gutenberg](https://wordpress.org/plugins/ultimate-addons-for-gutenberg/) has a larger user base, is regularly maintained, and is compatible with WPML ([see here](https://wpml.org/plugin/spectra/))."

September 24, 2024 at 12:04 pm #16214544

alinam-2

Hi,
Well, that's about shooting the ball in another field
The plugin works perfect. I record no bug nor issue, except those coming from WPML. Factually, it's not delisted, but listed. And again, does the job, whatever the wp version.
To which I can add other bugs in WPML, but that's not the topic.
WP is changing toward blocks.
WPML is only partly. Unfortunately.
Here, in our case, that's about how an image, within a post, and how it's managed via WPML. Again, it's manageable. Translation via WPML can work. But there is a bug in WPML which makes it CPU extensible..
Can you make the effort to test and evaluate the problem, including its negative CPU impacts?
Regards

September 24, 2024 at 12:50 pm #16215007

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

If you want me to debug this issue with "Undefined array key 0" further, let me know and we will check this, especially in relation with Modal Block plugin.

For CPU usage given that it is a different issue, please open (for our support rules) a new ticket so we could check.

September 24, 2024 at 6:09 pm #16217048

alinam-2

Hi,
Yes, I would like.
Sorry if I was not clear, but this "bug" is the cause of the CPU "overheat".
As I wrote, plugin works, translation can be made and are OK, my issue is the CPY overhead caused by this error
Hoping that this clarifies
Kind regards

September 25, 2024 at 7:47 am #16218581

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Since you've identified the Modal Block as a potential culprit, could you please check if you're able to reproduce the issue on this site?

hidden link

I have installed everything required, and activated debug logs, but if something else is required by all means.

If you're unable to replicate the issue here, I'll escalate the case along with your entire site to our second-tier support team.

September 25, 2024 at 1:55 pm #16221001

alinam-2

Hi,
Your proposition is inappropriate
The bug is not visible on front end nor back end
Only in error logs +++ + CPU monitoring.
How to make it them in sandbox?

September 26, 2024 at 8:42 am #16223731

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

I apologize if you misunderstood, but my proposal is a standard procedure we have here - if we find that some particular plug-in is triggering errors in combination with WPML, we test this plugin for possible compatibility issues first.

That's why in our sandbox just try to reproduce the same steps you are reproducing in your site.

In particular I mean this:

---

I have created an article titled *Essai WPML*. Please follow these steps:

1. Go to **WP > Articles**.
2. Preview the article in a new tab. Click on the photo to see how it behaves.
3. Right-click on the "+" icon in the English flag column for the article, and open it in a new tab. You will see two images along with the text. Complete the translation. For the images, select "Copy the original." Then, close the tab.
- Note: One of the images may not be treated as an actual image in this step.
4. Next, right-click the "+" icon in the German flag column and open it in a new tab. You will notice that one of the two images is not available for translation. Complete the translation and close the tab.
5. Finally, right-click the "+" icon in the English flag column again, and open it in a new tab. This time, the image will not be available for translation.

---

And then check if something - same error messages as on your site - show up in the error log, which is already activated.