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

Last updated by Diego Pereira 1 year ago.

Assigned support staff: Diego Pereira.

Author Posts
October 1, 2018 at 10:10 am

ronaldA-2

I am trying to:
"translate" an ajax script for booking vessels, I can enter the original ajax script for dutch language NL in the "Divi code module" but when going to the wpml translate editor the corresponding field "et_pb_code: content" is not shown and hence not "translatable/updatable" into ENG or DE

Link to a page where the issue can be seen:
hidden link (project page Scharrelaar Vissermanaak and also the project page Net om 'e Nocht for that matter)

I expected to be able to:
update/translate the scripts in the "et_pb_code: content" fields and change the old booking script with the new scripts

Instead, I got:
the new script in the original dutch NL language, the old script on the ENG/DE pages

NB
the "et_pb_code: content" is shown in all vessel pages that still have the original script in the divi code module (read, project pages that haven't been altered yet in the original dutch language)

NBB et_pb_code is present in the child theme wpml config file:
<shortcode>
<tag>et_pb_code</tag>
<attributes>
<attribute>background_image</attribute>
<attribute>background_video_mp4</attribute>
<attribute>background_video_webm</attribute>
</attributes>
</shortcode>

October 2, 2018 at 5:18 pm #2782378

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello @ronalda-2, welcome to the WPML support Forum!

Please add this XML code snippet to WPML - Settings - Custom XML Configuration

<wpml-config>
 <shortcodes>
    <shortcode>
<tag>et_pb_code</tag>
<attributes>
<attribute>background_image</attribute>
<attribute>background_video_mp4</attribute>
<attribute>background_video_webm</attribute>
</attributes>
</shortcode>
  </shortcodes>
</wpml-config>

After that please go to the edit screen of the page (original language), do a small modification and save.

If the issue persist, please send us a example of the shortcode. maybe we will need to do some adjustements on the code.

Please let me know if it worked for you.

Documentation link: https://wpml.org/documentation/support/language-configuration-files/

All the best,
Diego

October 2, 2018 at 8:43 pm #2782784

ronaldA-2

Hi Diego,

I can now indeed see the field et_pb_code again also in these two problematic project pages. It however seems that any changes I make in the wpml translation editor for these pages do not result in any changes in the actual translated pages (frontend). It also seems that several other translation strings on these pages are still correctly shown in the frontend as being translated (which they should still be), but in the wpml translation editor several appear to be not yet translated (translation complete is unchecked). I have also tried clearing cache-enabler, autoptimize and also several browsers (ctrl+f5) but to no avail ofcourse. Please advise.

Best, Ronald

October 3, 2018 at 1:18 pm #2784646

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Please try the following:
- Create a new page with a code field, a text field and some dummy content
- Check if the same issue happens on this new page

If so, please send us the link of the page. I will take a look.
PS: I'm trying to access the website but i'm getting a ERR_TIMED_OUT

Regards,
Diego

October 3, 2018 at 9:31 pm #2785790

ronaldA-2

Hi Diego,

the new (dummy) page seems to be working fine, the code field translations (and several other fields) are being translated without any problem. So it seems to be a translation string problem with the existing project pages in question.

No idea why you were getting that time-out error, I have visited the site manually multiple times today without any problems and also have an app on my phone that tests every 3 minutes if a connection can be made.

Best, Ronald

October 4, 2018 at 2:55 pm #2787911

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Perhaps the timeout error is related to my location (i'm in São Paulo, Brazil right now). I'm still having the issue.

As this issue happens on only one page, please try the following:
- Backup the website
- Install a plugin to duplicate pages/post, like this one: hidden link
- Duplicate the post
- Do a small modification on the new copy (on the original language) and save
- Check the translation to see if the same issue happens on this new page
- If this new copy is work normally, you can delete the old one (delete from the trash as well) then fix the name/permalink on this new copy to match the old one

IMPORTANT: Please backup your site first before making any change, this is important for security reasons.

Please let me know if it worked for you.

Regards,
Diego

October 4, 2018 at 5:20 pm #2788374

ronaldA-2

Hi Diego,

it isn't just one page, see my original post. It's on both existing pages which were attempted to be altered/translated. When that didn't work making changes was stopped and this thread started. Do you still recommend the same steps?

Best, Ronald

NB I forgot I have several countries blocked on this vps, among which Brasil (I was getting a heck of a lot of hacking attempts from your region and have no user base there)

October 4, 2018 at 7:09 pm #2788657

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

In this case I'll need to replicate your site to reproduce the issue and run some tests. For this please temporarily install a plugin called “Duplicator” AND "Cloudways Migration" (https://wordpress.org/plugins/bv-cloudways-automated-migration/) 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 copy site. Please let me know if this is ok for you.

IMPORTANT Please backup a working copy of site files and database before.

>>> PS: I'm still unable to access the website (I will need access to replicate it). You can check through this website: hidden link (select South America). There is a "TCP Connection Failed" error. Could you please check this with your hosting server?

Regards,
Diego

October 4, 2018 at 7:28 pm #2788679

ronaldA-2

I have a backup of both files and database at hand, can't I simply upload/send that somewhere? 🙂

October 5, 2018 at 3:17 pm #2791192

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

In this case let's try the following:
- Install the Cloudways Migration plugin on your website: https://wordpress.org/plugins/bv-cloudways-automated-migration/
- Use the following data on the plugin to create a copy of the website to our server: hidden link
IMPORTANT: The links at this forum are hidden from other users ( only you and me can see them). This link contains sensitive information, so do not post this link elsewhere.
- After the migration, the copy of the website should be available on this URL: hidden link
- Please login here using the same credentials of your website: hidden link
- Install this plugin and enable the maintenance mode: hidden link - This way only logged users will be able to see the new website

This way we will have a copy of the website where we will be able to run some tests. Please let me know if this method is ok for you.

PS: The server is located on New York, USA. Please check if your VPS is enabled to this location.

Regards,
Diego

October 8, 2018 at 12:19 pm #2795951

ronaldA-2

Hi Diego,

I have just migrated the site to Cloudways but I cannot login to the site there (slug is /receptie) there because a recaptcha plugin is active and blocking login (domainkey error ofcourse). Since I don't have ftp-credentials I cannot (temporarily) disable the recaptcha plugin to gain access and install the maintenance mode plugin per your request.

Best, Ronald

October 8, 2018 at 8:38 pm #2797277

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thanks a lot! I have disabled the plugin and activated the maintenance mode.

I will run some tests and send you a feedback soon.

Regards,
Diego

October 8, 2018 at 8:49 pm #2797295

ronaldA-2

Thanx for the update, in the meantime an editor has updated the divi code module on just about all of the project pages (against my recommendations) and I can see some problems on these pages now as well.

He has removed all the exisiting code modules on the project pages and added new ones, with this procedure he was able to get the code module translations working. However he forgot to add a 'no-scroll' script and if you try to add that to the existing code modules it works in the original Dutch language but it (again) does not work in English or German (even though the code change is reflected/shown in the wpml translation editor).

To give you one example: the vessel HA4. The last two fields in the wpml TE are problematic, the last one is the divi code module as described before and the field before it is now showing the original dutch text in both german and english (the field was translated before). Hope this helps with your search.

Best, Ronald

October 9, 2018 at 1:13 pm #2800102

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

I checked the project on the test website. To edit the javascript on the translation editor, you should select the "text editor". See screenshot. You should also check all "Translation is complete fields" in order to the translation be published.

I did a test by adding a JS alert on the translation and it worked (see screenshot). You can also check on the test website: hidden link (you will need to login to see it).

Please let me know if it worked for you.

Regards,
Diego

October 9, 2018 at 2:27 pm #2800464

ronaldA-2

Hi Diego,

1. I normally always use the text editor, but I'll pay extra attention and be sure to stress this with the regular editor.
2. I wasn't aware that no fields would be updated if not all the translation checkboxes are marked! This seems counter-intuitive to me.
3. Good to see that the JS script then works, but I wonder what happened to the field above it (that's not marked as complete) because that field was translated before but is now set to the same content as the original language. I've seen the same thing happen on several other project pages as well, for example Net om e Nocht: the fields that start with "<h5>Huren met Schipper - hoe zit dat ?</h5>" and the same field as with HA4 that starts with "Enkele van onze grotere Lemsteraken ...". And the Scharrelaar project has several such for now not yet again translated fields. Any idea?

I should be able to get everything fixed with the above information (thank you) I just wonder what happened to the fields that were translated before and reverted to the original language? I know the main editor oftentimes uses the Divi Visual Builder (which I detest myself), perhaps that plays a role?

Best, Ronald