This thread is resolved. Here is a description of the problem and solution.
Problem:
The client was trying to scan themes and plugins for new strings but the scan got stuck and never completed.
On the browser debug console the following JS error entry was fault:
"Cannot read properties of undefined (reading 'files_processed')"
Solution:
In this case the hopsting support was blocking:
sitename.com/wp-admin/admin.php?page=sitepress-multilingual-cms%2Fmenu%2Ftheme-localization.php
Ask the hosting support to whitelist any block on this behalf and further make sure that the minimum requirements for running WPML are met in the server.
Relevant Documentation:
https://wpml.org/home/minimum-requirements/
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.
This topic contains 16 replies, has 2 voices.
Last updated by tudorG-2 3 years, 2 months ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
March 9, 2022 at 8:51 am | |
tudorG-2 |
Stuck on scanning results |
March 9, 2022 at 9:59 am | |
March 10, 2022 at 8:28 pm #10762891 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hi, On your website first I ran the dialog to create WPML custom mo-files, which are language files needed for String Translation. See screenshot. This is a dynamic dialog, it will only show up when WPML detects new plugins, plugin versions or a theme change. Then I tried to scan for strings, and it appears that WPML has an issue only when trying to do this with the UDesign theme and its core plugin. I do not see an issue when it comes to scanning other plugins or themes on the website. I would suggest we try to replicate this issue on a test site, but I would need to ask you to install the UDesign Theme and UDesign Core Plugin in their latest version for this purpose. Would this be possible for you to provide the theme and its plugin for testing or could you maybe even check this yourself? Test-Site: Then from there if it is possible to replicate the issue on a new WordPress install that only uses UDesign and WPML, I will need to ask you to reach out to the theme author and report this issue. The author then can reach out to us and join our Go-Global-Program, so that we can support them by making their theme WPML compatible. https://wpml.org/documentation/support/go-global-program/ We hope for your understanding. Please make sure to have this issue replicated on a minimal setup, as explained above, before reaching out to the theme author. In case you try to replicate this yourself and the issue does not occur on a new WordPress Install with only UDesign and WPML, then please let me know and I will take a copy of your live site for further investigation. Please let us know if you do have further questions or need further assistance. Best regards |
March 11, 2022 at 11:10 am #10767687 | |
tudorG-2 |
Hi! I've installed and registered UDesign theme and all required plugins + a demo site on the test site you provided, then I ran the WPML setup wizard and scanned the theme: the scan is completed correctly. (attached screenshot). I later deactivated the theme from the sandbox installation as we need it activated on our site. Please proceed to making a copy of our site. Awayting your response. Thank you! |
March 13, 2022 at 6:50 am #10777247 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hallo, I have taken a copy of your site and I could still see here the JavaScript Error when scanning the theme for the first time. The error only occurs on the browser console as it appears to be JavaScript-related. I can not find any PHP error when scanning the strings. Then I disabled all additional plugins and scanned the theme while having only WPML and String Translation active, which solved the issue. Then kept reactivating plugins in small groups to verify if I can recreate the moment in which the issue occurs, but even when having all plugins enabled I could no longer replicate the issue. However, on your website, this appears not to solve the issue, and the JS error on the browser debug console further seems not to be related only to UDesign Theme, it also occurs when I scan for example the plugins installed on the site. It even keeps occurring when running the site only with WPML and String Translation which could mean that the Child Theme is causing the issue. Could you please make sure to save custom changes that you have taken inside the UDesign Theme Options, especially CSS changes? Please save them to the child theme's CSS file. After that please let us try to change to the parent theme and test if this solves the issue. Please only make sure to at least change your custom CSS; as it could get lost when switching the theme. Let me know once is done by replying to on ticket. Also, please try deleting any server cache, if applicable. If none of this will clarify the source of the issue, I might once take a complete copy of the site and consult our Second-Tier Support Team. Best regards |
March 13, 2022 at 7:40 am #10777333 | |
tudorG-2 |
Hello, I have moved all css into style.css of the child theme. I switched the theme, disabled the child theme completely (moved the folder), disabled all plugins, cleared the cache (java error does not appear in console anymore at this time) and rescanned: still, theme scan does not end. I clean reinstalled the parent theme and still the scan does not work. I then tried to scan other plugins and scan was ok with the exception of the Woocommerce plugin. Therefore the issue seems to be rather WPML related than UDesign theme related. |
March 13, 2022 at 8:21 am #10777377 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I saw the issue on your site even with other plugins that use a higher amount of strings. For example, when scanning the Child Theme, which has few strings, there was no issue. It seems to me to be an issue when a given high amount of strings is about to get scanned. The odd part is that I can no longer confirm the issue on localhost. (See screenshot) Now, usually in such a case, I would guess there is a conflict between WPML and hosting-specific must-use plugins. Could you please test this, by renaming the mu-plugins folder inside the WordPress Plugins directory? This should disable those plugins. After testing rename the folder and it will enable the plugins again. Further, would you be able to set up a staging site and provide admin and FTP access so that I can run another debug on your similar hosting plan and server environment? If so, take note that the private reply form is enabled again. Best regards |
March 13, 2022 at 9:12 am | |
March 15, 2022 at 2:44 pm #10794313 | |
tudorG-2 |
Hi, Andreas! Hope you read our private message reply. Any news on the solution for this issue? We need to translate the remaining strings in order to launch our site asap. Thanks! |
March 16, 2022 at 1:53 am #10797743 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, My apologies for the delay in answering, as I am not working on Sundays and Mondays. I have connected myself to your staging site, disabled anything but WPML and String Translation, and scanned the UDesign Theme after completing the dialog for creating new mo-files at WPML > Theme & Plugin Localization (See Screenshot). The error keeps occurring: theme-plugin-localization.js?ver=3.2.1:228 Uncaught TypeError: Cannot read properties of undefined (reading 'files_processed') I deleted and reinstalled our Plugins and reinstalled WordPress 5.7and switched to a default theme, but the issue remains. I also took another complete copy of the site and installed it on localhost with PHP 8.0 and MySQL 5.7.28, and the issue does not occur on this install. This means the reason appears to be related to the server WordPress is running on. I then revised the server setup and so far everything looks good on your site, but I realized one issue: The PGP eval() function appears to be disabled on the server. Could you please consult the hosting support and ask them to enable eval() on the server? Related documentation: Please let me know in case this will not solve the issue. Best regards |
March 16, 2022 at 8:42 am #10800043 | |
tudorG-2 |
Hi! Our hosting service enabled the eval() function. Then we switched to storefront theme, disabled all plugins except WPML CMS and String Translation, cleared the WPML cache, restarted the translation service and rescanned UDesign parent theme: the scan still does not finish so the issue is not resolved. What else can we do? |
March 16, 2022 at 10:05 pm #10807353 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I am not sure if the eval() function could be the root of that issue but according to the PHP info found on the staging site, the function remains disabled. Did the hosting support also clear the server cache? See screenshot. I am escalating this issue now towards the second-tier support team by providing access to the staging site. Please leave this account active, as I can not replicate the issue with a site copy on a virtual server. Once I received feedback from our team I will be in contact again. Best regards |
March 17, 2022 at 5:35 am #10808919 | |
tudorG-2 |
Hi! We are in development so we do not have cache enabled on our website or staging site. |
March 17, 2022 at 5:59 am #10809055 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Thank you for your message. With server cache, I was not referring to a Cache Plugin on WordPress but to consult the hosting support of they are using any kind of cache on the server itself and if so to ask them to clean it. More details: Please let them know that your WordPress install is showing JavaScript Error when trying to scan for PHP GetText Calls and the issue is not replicable with a complete copy of the site on localhost. Please ask them if they can see any error on the server on their end. Once I do have more information from our second-tier support I will get in contact with you again. Best regards |
March 17, 2022 at 7:13 am #10809261 | |
tudorG-2 |
Hi! Hosting support replied: - they disabled ModSecurity and Bitninja's WAF The scan still won't complete on my side. |