Este es el foro de soporte técnico de WPML, el plugin multilingüe de WordPress.
Todas las personas pueden leerlo pero solo los clientes de WPML pueden ingresar comentarios. El equipo de WPML responde en los foros 6 días a la semana, 22 horas por día.
Sun
Mon
Tue
Wed
Thu
Fri
Sat
-
9:00 – 14:00
9:00 – 14:00
9:00 – 14:00
9:00 – 14:00
9:00 – 14:00
-
-
15:00 – 18:00
15:00 – 18:00
15:00 – 18:00
15:00 – 18:00
15:00 – 18:00
-
Zona horaria del aficionado: Asia/Dhaka (GMT+06:00)
To reduce the waiting time, I took this ticket and responded in English. Please let me know if you're okay with it or if you want to continue the conversation in Spanish language. I will check and forward this ticket to one of our Spanish-speaking supporters to assist you in the Spanish language.
I understand that the same issue persists even after changing the PHP version. I took a closer look at the error log you've shared and found a Fatal error and two warnings. The Fatal error occurred because one of the arguments receives a string instead of an integer value. This type of error can occur due to a conflict between plugins. Could you please try running a plugin conflict test? It would be better if you could do this on a testing site where the issue is replicated to see if the problem persists.
Here is how you can test:
- Deactivate all plugins on your site except for WPML and its add-ons.
- Try to generate the .MO files and check if the issue still occurs.
- If deactivating the plugins solves the issue, start activating the plugins one by one.
- After activating each plugin, try to generate the .MO files again.
- In this way, you'll be able to trace which plugin is conflicting and causing issues generating the .MO files.
Regarding the warnings logged in the error log, this seems to have happened due to incorrect permissions for the files and folders on your site. Please check and ensure that the directories and files have the correct permissions. Typically, WordPress directories should have 755 permissions, and files should have 644 permissions.
Please check the information above and let me know how it goes. I'll be happy to help if you need further assistance with this matter.
On the server, this is shown in case you find it useful:
188.114.111.170
500
POST /wp-json/wpml/st/v1/pre_generate_mo_files HTTP/1.0
Error
188.114.111.170
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: array_slice(): Argument #2 ($offset) must be of type int, string given in enlace oculto\nStack trace:\n#0 enlace oculto): array_slice()\n#1 enlace oculto): WPML\\Collect\\Support\\Collection->slice()\n#2 enlace oculto): WPML\\Utils\\Pager->getItemsToProcess()\n#3 enlace oculto): WPML\\Utils\\Pager->iterate()\n#4 /var/www/vhosts/controladores.net/httpdocs/wp-content/plu...', referer: enlace oculto
Warning
172.64.236.80
AH01071: Got error 'PHP message: PHP Warning: realpath(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/controladores.net/httpdocs/:/tmp/) in enlace oculto on line 106; PHP message: PHP Warning: realpath(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/controladores.net/httpdocs/:/tmp/) in enlace oculto on line 106; PHP message: PHP Warning: realpath(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/controladores.net/httpdocs/:/tmp/) in enlace oculto on line 106; PHP message: PHP Warning: realpath(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/controladores.net/httpdocs/:/tmp/) in enlace oculto on line 106'
I have checked your site and noticed that Cloudflare is enabled. Sometimes, the firewall can block API access and cause issues. Have you configured any firewall rules within Cloudflare? If so, please temporarily disable the firewall rule and try again.
If the firewall is not configured in Cloudflare or elsewhere, a closer inspection will be necessary to determine the root cause of the issue.
I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.
You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.
IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: enlace oculto
Hello There,
Thanks for sharing the access information.
I have investigated the issue and discovered that a variable in the WPML core file is unexpectedly receiving a string value instead of an integer. This could be due to a conflict between plugins or code changes in the theme.
As a temporary solution, I modified the code where the error occurs by casting the problematic variable to an integer. This adjustment allows the MO file generation process to proceed successfully. Please review the attached screenshots for further details.
You can now generate the MO files without any issues. Since MO files need to be generated only once, please continue to use this workaround until we release an update for WPML.
I hope it helps. Feel free to let me know if you need further assistance in this matter. I will be happy to help.