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: Bug
This topic contains 18 replies, has 1 voice.
Last updated by Rasha Kanjarawi 1 month ago.
Assisted by: Alejandro.
Author | Posts |
---|---|
June 19, 2025 at 7:32 pm #17152235 | |
Rasha Kanjarawi |
Hi Alejandro, firstly heartfelt thanks for your excellent support! There's a saying in German (I was born in the UK but live in Germany): I've bitten my teeth out on this problem! The vServer was migrated (by my provider) to a new host machine around 3rd June, and the DB thereby got corrupted. It took me a time to find the problem, and then I did a fallback to a DB dump from 1. June. That solved the DB problems. But possibly even the file system might have got corrupted too during the migration? Your reply "The interesting part when checking directly in your server is that it seems those files that are throwing the request are in the same server but not on the installation you gave us access to but in another from the same server" gave me further cause to doubt the integrity of the file system. So I set up the boot parameters of Grub to run fsck at boot time - in repair mode. That worked (I mean the boot was successful) but has not resolved the problem I'm having. I've also run a complete site integrity scan using WP Cerber (which I'm a fan of) - and it has verified all the files of that plugin. It also looked at all the WPML plugins and lacked the original zips to verify them - but seemed to have no problem reading their files. My plan now is to deactivate automatic updates on WPML String Translation and patch the files causing errors myself. If the patches don't work that would suggest they are indeed being picked up somewhere else: There is a development einvironment on the server, at deb.syrian-heritage.org, but it's disabled in Plesk. I added it's docroot to the open-basedir of syrain-heritage.org but that also made no change. So now I'll be editing those PHP files - unless your dev's are going to do that anyway. Kind regards, Tim |
June 19, 2025 at 9:10 pm #17152363 | |
Rasha Kanjarawi |
Hi Alejandro, I've debugged the files causing errors, and found that quite often $mofile starts with "wp-content/", here's an excerpt from my debug log, which was generated so: $debugText = "{$mofile} | {$replaced_mofile} | {$domain} | {$locale}\n"; wp-content/languages/plugins/wpfront-scroll-top-de_DE.mo | wp-content/languages/plugins/wpfront-scroll-top-de_DE.l10n.php | wpfront-scroll-top | de_DE Obviously, trying to do a file_exists() or is_dir() on sich a string must fail. So I locally patched my versions of LoadTextDomain.php and LoadedMODictionary.php with this extra line: if (strncmp($mofile, 'wp-content/', 11) === 0) { $mofile = ABSPATH . $mofile; } And now, all my error messages have disappeared. I think the question for your devs is therefore, how come in quite a lot of cases the ABSPATH is missing at the start of $mofile? Kind regards, Tim |
June 20, 2025 at 7:13 am #17152869 | |
Alejandro WPML Supporter since 02/2018
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
Thanks for this information! I'm checking with our devs but I believe that the fix we are working on for this entire issue was going to tackle this. I'm not 100% sure of it but our devs will confirm shortly if that's the case and if not, well we're going to try to do something about this to make the entire plugin more robust in that area 🙂 For now, I'm glad you could patch the files so you don't at least get more of those notifications. |
June 20, 2025 at 7:13 am #17152870 | |
Alejandro WPML Supporter since 02/2018
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
Thanks for this information! I'm checking with our devs but I believe that the fix we are working on for this entire issue was going to tackle this. I'm not 100% sure of it but our devs will confirm shortly if that's the case and if not, well we're going to try to do something about this to make the entire plugin more robust in that area 🙂 For now, I'm glad you could patch the files so you don't at least get more of those notifications. |
June 23, 2025 at 5:09 am #17157927 | |
Rasha Kanjarawi |
The issue is solved with the patches I myself made to three files in String Translation. You wrote that your dev's are addresing a known issue, so this ticket is closed. |