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

Last updated by grantH 3 months, 1 week ago.

Assigned support staff: Bobby.

Author Posts
July 15, 2019 at 8:46 pm #4214571

grantH

I am trying to:
I have duplicate textdomains on the Theme and plugins localization page. The duplicate textdomain has 0 completely translated and 1 string in need of translation. When I click on the 1 I am taken to the String translation page with No Strings found.

Link to a page where the issue can be seen:
hidden link

I expected to see:
Only one Textdomain - drummondco

Instead, I got:
I get two entries for drummondco.

Additional Information:
I have gone through all of my code to ensure that the domain is the same throughout - and from everything that I can tell - it is...there still may be a problem that I have created; but I am not seeing it, if there is....

July 15, 2019 at 11:47 pm #4214809

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi There,

are you using a custom theme ?

This is not a concerning behavior , as it shouldn't cause any problems with your String Translation, as it seems that your strings have been correctly picked up "86"

we might be able to see if the 1 string is registered if you go within WPML->String translation -> filter by Select strings within domain

let me know if you can see it listed on there twice

July 16, 2019 at 1:34 pm #4220475

grantH

Bobby, yes, I am using a custom theme. In the "Select strings within domain" I see 4 entries for drummondco on the String Translation page. Three of them show drummondco (1) and are listed directly under All domains. When I select these three domains - they come up with No strings found. The fourth item, drummondco (86) is the one that has all of the strings, and is sorted correctly, alphabetically, in the dropdown.

An interesting thing is that the top three drummondco (1) items - when I select them from the "Select strings within domain" they do not remain selected - All domains is what shows up in the dropdown. And, the context looks weird. Here is what shows up for the context (in the URL) for each of the drummondco (1):

drummondco (1) - context=++++++++++++++++++++++++++++drummondco+
drummondco (1) - context=++++++++++++++++++++++++drummondco+
drummondco (1) - context=++++++++++++drummondco+
drummondco (86) - context=drummondco

When you select drummondco (86) from the list it stays in the dropdown, for all of the other domains - they do not and All domains is shown; however, the context on the URL is shown as what I provided above.

July 16, 2019 at 6:45 pm #4223353

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

It seems that ST is seeing drummondco different than drummondco

thus being picked up more than once.

there could be a trailing slash within your code ? Technically this should not cause any issues but if you would like to just remove the duplicate i would say you would have to figure out the string with this duplicate text-domain and remove it from the source code of your theme.

unfortunately we are limited when it comes to custom work and custom themes within the support forum but i will try my best to point you to the correct direction

July 16, 2019 at 9:26 pm #4223929

grantH

Bobby, I have been thoroughly through the code and all references to retrieve a string translation (i.e. "__" or "_e"...etc.) reference the 'drummondco' domain. That was my first thought when I first noticed the "problem" - I thought possibly I had a space or something after one of the references to the domain.

After I got your most recent reply I have gone through the entire theme and changed all of the references to 'drummondco' to 'drummondco-theme'. I then deleted all of the String Translations for 'drummondco' - the 86. Re-translated the 'drummondco-theme' strings. And I am still left with three drummondco (1) in the "Select strings within domain" dropdown and on the Theme and plugins localization page, in the Strings in the themes - I now have drummondco 0 / 1 and drummondco-theme 83 / 0.

When I click on drummondco, or select any of the three from the dropdown menu, No strings are returned - I get the message, "No strings found".

Is there some way that I can figure out what these strings are attached to - is there possibly a log file or something, when I scan my theme, to see what WPML is pulling the information from?

I realize this is not a HUGE issue...everything on the front-end is working as it should. Something went haywire, which could have totally been something I did, I am just not sure if / how to correct it now.

The main reason I wanted to report the problem is because there is something going on with the WPML code somewhere and wanted to let you guys know so that if there was anything I could provide to help you figure out where things might be going awry I could...etc. And, of course, I would like it cleaned up on my end too since it looks weird and I will have to note it somewhere for the next person that might take on the theme.

July 17, 2019 at 1:35 pm #4230571

grantH

Bobby, I uploaded our theme to the sandbox environment, activated it, and then went to Theme and plugins localization. Here I scanned the DrummondCo.com theme for strings and the only text domain that it found is drummondco-theme and it found 83 strings. Which matches my results from our server, except I cannot get rid of the drummondco listed on the Strings in the themes - or the three drummondco (1) listed on the String translation page.

July 17, 2019 at 5:12 pm #4232497

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for uploading it to our sandbox environment , i can see that it shows as expected.

Onlly 1 domain listed in both Theme and Plugins Localization and WPML String Translation dashboard.

i believe this might be a cache related issue on your site. Being that this is not reproduced on a clean environment and not a bug within WPML i believe that we can assume that there is not an issue here within WPML's code.

July 17, 2019 at 5:34 pm #4232627

grantH

How do I go about deleting any WPML cache on the site? I am not running any caching plugins.

July 17, 2019 at 7:00 pm #4233045

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

You can do this by going to WPML->Support->Troubleshooting->Clear WPML Cache

July 17, 2019 at 7:12 pm #4233149

grantH

Thanks for that bit of information, I did not know about this troubleshooting page; however, I have run Clear the cache in WPML and Remove ghost entries from the translation tables and neither one of them solved the problem. So who knows what might be going on or what it is thinking.

July 17, 2019 at 8:41 pm #4233425

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

You could potentially uninstall and delete the theme then re install it as that would reset what Themes and Plugins localization has picked up but being that this bares no performance or usability issues uninstalling the theme would have a higher chance of causing problems

July 17, 2019 at 9:58 pm #4233627

grantH

Bobby, I may try that when I have some down time and time to play with it. Thanks for all of your help!