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 10 replies, has 2 voices.

Last updated by noamK-2 1 year, 4 months ago.

Assigned support staff: Yvette.

Author Posts
May 16, 2018 at 9:57 am

noamK-2

Hello,

My question is:

May scanning plugins and theme for strings once in a while, cause any issues? e.g.

- Duplicate strings
- Issues with strings for which translation has already been completed
- Other known issues.

Thank you,

Noam Kroll

May 17, 2018 at 9:33 am #2172038

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello

I´ll be helping you with your questions.

- Duplicate strings
No, rescanning a plugin for strings will/should not add strings that are already present.

- Issues with strings for which translation has already been completed
The same thing here, it will only reset the translation status of the string if it has changed

- Other known issues.
I would need to check specifically for this, but if an update to a plugin REMOVES a string that has already been translated, it is not certain that this string would be removed

Does this answer your question?

May 17, 2018 at 9:59 am #2172873

noamK-2

Hello Yvette,

Good to see you again 🙂

Thank you very much for your reply.

1. Regarding the third point: Is there any systematic method to identify the strings that have not been removed?

2. I would be grateful for information regarding known issues.

Regards,

Noam Kroll

May 17, 2018 at 11:35 am #2174740

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

I´ll be looking into this and also scan our internal db for any known outstanding issue. I´ll update this ticket when I have some news.

May 17, 2018 at 11:39 am #2174754

noamK-2

Hello Yvette,

Thank you so much! Greatly appreciated!!

I will be looking forward for your update.

Best Regards,

Noam Kroll

May 18, 2018 at 6:47 pm #2191432

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello

Sorry for the delay

1. You asked: "..1. Regarding the third point: Is there any systematic method to identify the strings that have not been removed?.."

First, I can confirm that rescanning the plugin with new strings will not necessarily remove a string that was removed /replaced by the theme. This means that there is a chance that there are unnecessary strings hanging around the String Translation table taking up space.

I am not sure how you can identify which strings have not been removed.

What you could do would be the following:

- Export all of your existing string translations to a .po file for a particular text domain and language. One file for each existing langauge.
- Then delete all strings in that domain
- Rescan the plugin so that all strings are re-scanned and re-loaded
- Import the .po files you previously exported with translations.

This will then match the existing strings with their translations and mark the translation as complete.

2. Known "issues"

Scanning our internal database, I can see that the primary concern with String Tranlsaitons is the performance. This has to do with the large table sizes. What you can do is to make sure you only have the text domains that you really need scanned and loaded.

You can turn off the automatic registration of strings at the bottom of the String Translation table or selectively turn off the text domains (see image).

I hope this information is what you were looking for.

May 26, 2018 at 10:58 am #2232987

noamK-2

Hello Yvette,

Thank you so much for your reply.

We encounter a strange phenomena:

1. We are <able> to scan for strings on our main website: hidden link (Dashboard>>WPML>>Theme and plugin localization).

2. <However>, for some reason, we are <unable> to scan for strings on our subdomain hidden link

3. In this subdomain, when you go to Dashboard>>WPML>>Theme and plugin localization>>Strings in the plugins, and choose any plugin (e.g. Ajaxified Cart WooCommerce), you get an infinite scanning window. The scanning never ends so all you can do to stop it is refresh the page. And off-course, no actual scanning is performed.

4. The strange thing is: Our staging subdomain is IDENTICAL TO THE MAIN DOMAIN. They share the same theme and the same plugins.

5. Their WPML installation and configuration is similar. Both are correctly registered under our WPML account.

6. I checked other support tickets reporting the same problem (infinite string scanning). There are quite many reporting this issue, but I couldn't find a solution for our special circumstances.

If you enable a private message, I will provide you with subdomain credentials.

Thanks,

Noam Kroll

May 26, 2018 at 11:04 am #2233075

noamK-2

Hi Yvette,

As a follow-on to my previous message: I can provide the debug information for the subomain, if you enable debug information reporting once again.

Thanks,

Noam Kroll

May 26, 2018 at 7:09 pm #2233990

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello

I am enabling the private area for you.

May 27, 2018 at 10:48 am
May 28, 2018 at 10:41 am #2237886

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello

I took a look at the console for the plugin scanning process and can see it is failing with a server 403 error.

Googling "403 error"" I can see that this has to do with permissions and URL access. The various articles point to problems with the .htacess file.

So, I took a look at the .htaccess and can see that there are additional entries that don´t have anything to do with WPML. My suspicion is that the error is linked to the way you have created the staging environment. There might be some environmental variable that is relying on the URL of the original site and so there is an issue of permissions and access.

In order to continue troubleshooting, I would like to ask you to do the following:
1. Deactivate all non-WPML plugins
2. Use a Twenty Seventeen theme (temporarily)
3. Restore the .htacess so that it is just containing what WPML would expect:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Then try to scan any plugin - do you still get the same error?

Thanks for trying this and letting me know the results.

May 28, 2018 at 4:29 pm #2240725

noamK-2

Hello Yvette,

You hit the bulls eye!

htaccess in staging.krollconsultants.com had 3 lines that needed correction.

In those 3 lines ,the url was incorrect. it didn't include the trail staging.krollconsultants.com. Instead it showed only hidden link (lines 7, 11, 16).

I realized this was the issue by simply comparing it to the htaccess file of the other subdomain - stagingtest.krollconsultants.com

I also discovered that the stagingtest htaccess wan not perfect either. those 3 lines referred to http instead of https (although it caused no issue with strings scanning).

Thank you so much for all your help!! Greatly appreciated!!

Noam Kroll