This thread is resolved. Here is a description of the problem and solution.

Problem: WPML Translation Management showing wrong (high) word count for pages created with Elementor.

Solution: It should be fixed in the next WPML version, 4.4.0.

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.

Our next available supporter will start replying to tickets in about 2.26 hours from now. Thank you for your understanding.

This topic contains 36 replies, has 3 voices.

Last updated by zoeyY 1 month, 4 weeks ago.

Assigned support staff: Dražen Duvnjak.

Author Posts
April 8, 2020 at 11:43 pm #5870347

zoeyY

Tell us what you are trying to do?
I try to use your translation mgr the first time. I have one page with mainly heading, text, and links to external contents. Based on my word count on Google doc, it's around 600 words max. The page count itself estimated: Word count estimate: 6785 words in 1 document(s)
Is there any documentation that you are following?
Newsletter
Is there a similar example that we can see?
To translate to 2 Russian and Norwegian, it's estimated for 16K words, this is rather ridiculously wrong?
What is the link to your site?
hidden link

April 12, 2020 at 1:33 am #5890367

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for contacting the WPML Support Forum.

I hope you don´t mind but I would like to have a look at this issue and request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

You will find the needed fields for this 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” 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 make a backup of 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:
hidden link

Kind regards
Andreas

April 12, 2020 at 7:13 am #5891639

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Usually, those strings should be saved from time to time in custom .mo-files but it seems the option is not functioning on your site. One reason might be that WPML is not able to write on your server directory.

Please read the following documentation, follow the instructions and then create the new custom .mo-files. this should clear the strings from String Translation. (Strings that you scanned for earlier).

Then also open the translation again and check the word count. I hope this will be solved this way too but make sure that this number on the translation basket refers to all languages and additional site content, like for example SEO Title and Meta.

We will have to have a look here, as it might be that the word count is somehow related to strings that are related to settings. Please first solve the issue with the .mo-files and cancel the current translation job. Once you created the .mo-files, create a new translation job and check the word count again.

The .mo-files further take care of content that can be translated automatically using the default WP core, Theme and Plugins strings in their available languages provided by their authors.

Kind regards
Andreas

April 12, 2020 at 7:05 pm #5892721

zoeyY

HI Andreas, your msg didn't have a document link, pls send.

Also this is a brand new install the first time. Thought everything is default? More questions:

1. On the config about if I use translation service is confusing - the WPML automatic service is not on the list. Which option should I choose then? We have our internal term for vetting but also like to use WPML automatic service first.
2. I haven't submitted any job yet. Just by selecting the newsletter, it already shows the word count on the bottom per my last msg.
3. What is the purpose of this string translation and is it creating a lot of overhead (SQL DB size and performance impact?)

April 12, 2020 at 9:33 pm #5892957

zoeyY

Hi, Andreas, further to this, I have read your .mo file write access problem. But I didn't get any error msg during installation or any MO file write access problem. So which path should I request to grant access, and to whom? This is very confusing.

Per the support doc:" WPML’s error message will give the full path of the folder that needs changing. Please copy/paste that path and ask your hosting company to make it writable, so that WPML can save its .mo files."

Pls advise. Also pls help clarify my other questions pls.

April 14, 2020 at 4:00 pm #5906107

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

I am really sorry for missing to pass the link:

https://wpml.org/faq/cannot-write-mo-files/

In fact, the only issue might be that the folder wp-content/languages is not set as "writable" and therefore WPML can not create the custom language folder wp-content/languages/wpml.

Can you check on your server, if the folder exists?

In doubt, please reach out to your hosting provider and explain the issue.

Once this is done, we can create custom mo-files at WPML -> Theme and Plugin Localization -> White Dropdown Box over the first section.

This should reduce the word count and remove strings from String Translation which are then gathered in real-time by using the language files (.mo-files) provided by WordPress, Theme, Plugins and such that WPML uses for the translations.

I hope this will solve the issue, otherwise, we will need to investigate further.

Kind regards
Andreas

April 14, 2020 at 5:24 pm #5906999

zoeyY

Andreas, I have enabled write to the WPML language folder. But the options on the Theme and localization menu doesn't have the drop-down like you mentioned. It offers only:

Automatically load the theme's .mo file using 'load_textdomain'
Enter textdomain:
or
Use theme or plugin text domains when gettext calls do not use a string literal

Pls can you check the latest version you have on your download site to give the instruction accordingly? I am getting info that doesn't match w the options your advice gives. So sounds like the version is different?

Also, what else do you need to change on this Theme & localization page ??? Pls provide detailed guidance that follows the latest version's menu option. Our needs are very simple -
1. use your automated translation service where possible.
2. allow our own admins to verify and update the translation.

April 14, 2020 at 6:27 pm #5907205

zoeyY

Andreas, further to the above, given you have access to the staging site, can you PLEASE just config it so it works properly, and let me know what's done to make it working properly so I can simply replicate the options in the prod site for changes once this WPML is working? it's really time-consuming going back and fore on simply a first time setup. I see it was Easter and you guys are very busy. I understand that.

But like buying a new coffee machine and you can't get it working, you can appreciate how frustrating it is for a simple 1-page translation the whatever default configuration doesn't seem to make it work.

Again, all we want is -

1. wp dashboard stay only English
2. translation on for pages/posts/ other future plugin contents (e.g. quiz in multilingual)
3. use your WPML automated translation service
4. use the manual translation by our own staff

thanks

April 14, 2020 at 11:09 pm #5908439

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

As stated in our documentation, sometimes hosting providers limit access to server directories for third plugins. Did you reach out to your hosting provider about this issue?

I can see the folder wp-content/languages/wpml does exist but it doe snot include any files. Further, the WPML Option to scan and create such files is not available, not even from the WPML Troubleshooting section. (WPML -> Support)

I created a copy of your site to test it on localhost and until now I am trying to complete the download which seems to be very slow and the network connected si getting canceled quite often. Those issues are clearly server related and might be another restriction from your hosting plan.

Once I was able to verify if the issue persists on localhost (Virtual Server) I will be in contact. Take note that in case the issue will not persist son a local copy of your site it is hosting/server related.

I will be in contact soon. Please reach out to your hosting support in the meantime.

Kind regards
Andreas

April 15, 2020 at 12:32 am #5908489

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for your patience.

I took a copy of your website and I had not an issue with creating the .mo-files on this copy. As explained in my last message, please reach out to your hosting company in order to solve this permission issue, as WPML otherwise will not be working as expected.

Now, in regards to the Word Count, there seems to be an issue and I will try to test this tomorrow on a new install of WordPress. Anyhow, I created a translation job for the page Newsletter and while in fact opening the translation inside of the Advanced Translation Editor the Word Count was correct. See screenshots.

I will contact you tomorrow, once I can verify if there is an issue with the Word Count even on a new WP install.

Kind regards
Andreas

April 15, 2020 at 4:50 am #5909895

zoeyY

Thanks Andreas. Appreciate your patience.

The folder permissioning has been done before I sent you the msg earlier. I have added both the write and read permission. Now note that the instruction was only for the wp-config/languages/wpml folder. However given the inheritance nature of folders, does it mean the parent folder /languages should also have read write access?

Also, how to get to the page on your screenshot capture 4? I thought I config the system to use the Advance translation feature and I can't seem to find a way to get to your capture 4. Pls advise.

And we just need write or read or both access by WPML?

April 16, 2020 at 4:00 am #5918695

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for your message.

Sadly I do still not see any option available for scanning for language files in WordPress. As mentioned it worked on a copy of your site. I would suggest giving complete read/write permission for the whole directory and if this will not succeed, please reach out to your hosting provider support team.

In regards to your request, I can confirm that there is an inconvenient word count inside of the translation basket, and I will consult my colleagues tomorrow and escalate the copy of your site for reference.

Anyhow, when opening the Advanced Translation Editor (from my screenshot) everything is looking normal.

I opened the translation job by going to WPML -> Translations but you will need first to assign a translator including the language pairs for this role at WPML -> Translation Management -> Translation Roles -> Add a Translator.

Then go to WPML -> Translation Management -> Translation Dashboard and create a job.

You will then see the available jobs for translators at WPML -> Translations.

Anyhow, as long the Advanced Translation Editor is enabled it will also open when adding translations for content as admin ("+" Symbol on WordPress Editor, Pages, Posts, Products, etc.)

The only exception would be if the WPML Translation Editor was disabled in the right sidebar of the WordPress Editor for given content or if the content was already translated without Classic Translation Editor. Then by default this older version of our Translation Editor will be used.

Please check out my advice and let me know if you do have further questions. Tomorrow I will take care of the escalation of the Word Count issue inside of the Translation Basket.

Kind regards
Andreas

April 17, 2020 at 2:05 am #5927867

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

I was not able to recreate the issue on a new install, but after reviewing your site I found a error in relation to our Translation Proxy Server:

AMS Server Communication	Api error conflict: Website with uuid: 32663933-6164-5762-b638-306665353535 exists!	0	0	{"errorData":{"status":409,"title":"Api error conflict","detail":"Website with uuid: 32663933-6164-5762-b638-306665353535 exists!"}}

The error this to be related to the fact that the site is registered twice, but do I understand right that staging and live site do show the same error on WordCount?

Further, I gathered some information from the communication log-file between ATE and our Proxy Server. I am passing this information towards our second-tier support for review.

Now, I created a new test page on your staging, which includes 520 random words, 1 title and 1 slug. The Word Count on the Translation Basket shows exactly 522.

Now, I even took the content of your Contact Us Page and recreated it on my test site using the same Gutenberg Classic Block and the WordCount is 26.

I did the same on your staging using the content of your Contact Us page and Word Count is correct. Take a look into the current basket.

I am really not sure what is causing the issues on your site but seems somehow to be solved, as it does not occur on newly created content.

I am consulting our second-tier support about the issue and I will be in contact once I receive more feedback.

Kind regards
Andreas

April 18, 2020 at 5:34 am #5937391

zoeyY

Hi Andrea, thanks for the updates. I have checked everything default when I installed the 2nd time on my prod site (happinessandwork.com) after I deleted everything and reinstalled. The staging you are using is a replica of the prod site after the 2nd install. I have installed on another site app.happinessandwork.com

As mentioned in the other ticket, the deinstall DIDN'T clear everything cos all the settings remained w those from the first install. There was an error during the first install as mentioned on my other ticket (pls see). It happened when after 1st install and while config the setup, I clicked Strings in the themes or plugin (not sure which one got stuck now pls refer to ticket). That scan string process simply won't stop until I had to close the browser. And this is the one that seems to 4x the size of my SQL DB.

so pls explain

1. what are the translation string in themes and plugins options for? do I need to select to activate or run it or leave default?
2. how to clear out the data done by #1 process I did that during the 1st install and now they are still there even I want to delete and reinstall (note delete and reinstall didn't clear them)
3. to make this first time user /install experience pleasant, can you simply tell me which steps to clear away all the old stuff so I can reinstall wpml to make it work on both of my prod site?
4. it seems the app. site is having the word count correctly. What did you do to fix it? how can I do the same to fix my prod site?

April 19, 2020 at 1:28 am #5940313

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Usually, WPML used to save all the strings inside of the database. This means when you scan the plugins or themes at WPML -> Theme and Plugin Localization, you are actually adding all those strings into the database, no matter if they really need to be translated or not.

In order to solve this issue, as it caused performance issues in cases with a lot of plugins, we changed the way WPML works.

You are still able to scan for strings, but now we added the option to create custom .mo-files.

In fact, WP Core, each theme and plugins comes with such .mo-files. Most of them also with .mo-files for different languages. Now, WPML will use an own folder to generate .mo-files from String Translation and merge those custom files in real-time with those .mo-files coming from WP Core, Theme and Plugins.

This is why it is really important to get this option to work on your site.

For the issue with the word count, I actually discovered that this does not count for new content and the issue might be related to an earlier issue, that occurred while your old content had been created.

If you create a new page on your production site and send it for translation, do you still see a wrong word count?

If so, I would advise making a backup of the site and database and then make sure that all plugins and the theme is updated.

Then go to WPML -> Support and look for the link "Troubleshooting".

There use options inside of the section "Clean Up" and more down on the site use "Clean up and optimize string tables". Then check again if the issue still occurs for new content. Take note that on my test the issue still occurred for old content, only not for new ones.

https://wpml.org/documentation/support/wpml-troubleshooting-options/

Even if not ideal, a possible workaround here would be to recreate the content in a new page and then delete the old content.

Please take note again, that the wrong word count was only visible on the translation basket and not on the actual ATE translation interface. this means that this word count should not affect the words needed for machine translation or translation services.

I will be off the next week. If the issue will not get solved after applying my suggestions, please follow up on this ticket, as I am assigning it now to an available colleague.

I hope for your understanding.

Kind regards
Andreas