We were looking for why this is happening, there must be something wrong with the paths because of wpml, why practically every plugin looks for some translation paths that it doesn't have. What are these translations generated for?
E.g.
[pid 2890633] access(“/home/webdev/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/languages/woocommerce-pl_PL-aa7a3480f33a5581acfa9234d6a753d5.json”, R_OK) = -1 ENOENT (No such file or directory)
There isn't even a directory like 'languages' w '/home/webdev/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/'
These files are searched by about 10,000 from each plugin, several hundred each plus some singles
I found such an option in the wp panel 'localization of the theme and plugins', I'm sending a screenshot, maybe something is wrong here since it shows me a lot of phrases to be translated, but why the hell should I translate phrases from inside the plugin?
What you are displaying on the second screenshot is from within WPML->Theme and plugins localization.
These are 'strings' that have been registered for translation in your theme and plugins. Both themes and plugins register strings (texts from their code) that way it can be translated.
IF the .mo file exists WPML will add the translation automatically, IF it does not then you can add translation to these strings manually using String Translation.
Regarding the access(“/home/webdev/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/languages/woocommerce-pl_PL-aa7a3480f33a5581acfa9234d6a753d5.json”, R_OK) = -1 ENOENT (No such file or directory) notices , these are notices most likely due to certain .mo files not existing after a check from our plugin as mentioned in the previous reply.
"this is expected as what happens is WPML will check for the .mo files and if they exist they will get pulled for translations. All themes and plugins are checked for this. WordPress itself does a similar check as well when using a different language."
I have opened a discussion with our dev team regarding this and will update you once I have some feedback.
I checked it and the file I indicated, i.e. "https://cdn.wpml.org/woocommerce-pl_PL-aa7a3480f33a5581acfa9234d6a753d5.json" is in the /wp-content/languages/plugins/ directory. The path to its translation is wrong and that is the biggest problem
Ok, I will just add that errors during php trace will appear all the time. In that case, we do not move anything in the admin panel and wait for good information.
I have done some tests on a staging environment and discussed this with our dev team, which confirmed the following:
- the list you see with “Not founds” is not an issue. Let me explain why.
WordPress seeks .mo files in different places if they exist or not
The places can be for example wp-content/languages/plugins/ or the plugin folder itself
wp-content/plugins/test-plugin/ or if the plugin has a separate directory that is used for files: wp-content/plugins/test-plugin/translations/
So it is normal to make a check, to see if a file exists or not and to load it.
Query Monitor can show you the requests as it logs everything and shows that the request to a specific location for a particular filename is not existing.
The above case is normal and will not pose any threats to your site. To also add to this there is no way around this check at the moment or a feature that would disable the checks for the .mo files.
The topic ‘[Closed] .mo files not found’ is closed to new replies.