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 thread is resolved. Here is a description of the problem and solution.

Problem:

The user was having error while trying to synchronize translators. undefined method organization for nil:NilClass

Solution: This error happens after updating to 4.2.1 and is caused by a mismatch in database table wp_options between WPML_SITE_ID:ate and WPML_SITE_ID:global. Once we copy the value of WPML_SITE_ID:global in WPML_SITE_ID:ate. This error get fixed.

This topic contains 12 replies, has 2 voices.

Last updated by Itamar 6 months ago.

Assigned support staff: Itamar.

Author Posts
March 29, 2019 at 2:43 pm

Morfe

I am trying to:
translate a form in the translation basket but I can't manage the translations anymore I wanted to send it to local translator account.

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

Instead, I got:
an error the link to the translation editor won't work and if I try to edit the settings it won't go there there is a new announcement:

There is new translated content on this site. You can scan messages and strings to adjust links to refer to translated content.

Translate Link Targets
but I'm afraid it will adjust link I dint want to adjust and the site gets f**ked.

How do I fix this?

March 29, 2019 at 5:09 pm #3493239

Morfe

I reproduced it in a local site even all updates and letting the link target run doesn't solve the issue

March 29, 2019 at 5:47 pm #3493585

Morfe

I have temporarily put form id 6 in the page so the life site stays in tact.

March 31, 2019 at 8:23 am #3501359

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I can see this issue on your site. And I suspect that it is related to a known issue that we have. When I go to WPML -> Settings and press the 'Synchronize translators and translation managers' I get an error:

Error: No method error: undefined method `organization' for nil:NilClass

Please see the attached screenshot. Because of that, I've installed the ARI Adminer plugin (https://wordpress.org/plugins/ari-adminer/) on your site to check the DB. I can see the issue on the DB and I want to fix it in hope that it will fix the problem on the Translation Basket. But I must make sure with you that you have a recent and full backup of your site (files and DB).
Could you please confirm that and allow me to make the DB change?
The change is quite simple, the WPML_SITE_ID:global and WPML_SITE_ID:ate need to be with the same value. The value of the global option.

Thanks,
Itamar.

March 31, 2019 at 8:40 am #3501397

Morfe

Hi Itamar,
Thank you for trying to help me solve this. There should be a database backup in the zip file that is Made with duplicator that is attached as dropbox link to this ticket. Can you see it?

Kind regards, Debbie

March 31, 2019 at 8:52 am #3501415

Morfe

What does that id do and what kind of reprocussions will it have on the translated content did you try it on a local install? It is very important to the cliënt the site looks good during this period of promoting and paid avertising.

Kind regards, Debbie

April 1, 2019 at 2:01 pm #3508743

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Debbie.

Those IDs are related to WPML's internal value for a specific site ID and its ID for our Advanced Translation Editor. Similar issues have already been reported to us. You can see a reference for that at the following links to forum tickets.
https://wpml.org/forums/topic/problems-syncing-advanced-translation-editor-users-with-ams/
https://wpml.org/forums/topic/from-some-days-the-advanced-translation-manager-dont-work/
Our developers have already created a fix which will prevent this issue from happening in the future. The fix will be added to the next WPML release.

I've downloaded the Duplicator package of your site that you have shared with me and installed it on my local server. Then I checked, and I could see the problem also on my local server. By performing the minor DB change, I was able to fix this issue. Now on your site's copy, I was able to send the 'stuck' job (Gravity Form – Zomerschool Introductie tot de Westerse traditie) on the 'Translation Basket' to a translation by a local translator. Please see the attached screenshots.

Here is what you need to do on your site to fix this issue.
1. Make sure tot created a backup of the DB.
2. Open the DB application (like PHPMyAdmin) and run this query:

SELECT * FROM wp_options WHERE option_name LIKE '%WPML_SITE_ID%'

3. You should see 2 results: WPML_SITE_ID:global and WPML_SITE_ID:ate.
4. Write down the values for each of these options and keep it in a safe place.
5. Update the WPML_SITE_ID:global value into WPML_SITE_ID:ate value.
6. Go to WPML > Settings and press the 'Synchronize translators and translation managers' button. Wait for the process to finish. Now the error shouldn't show.
7. Go to WPML -> Translation Management -> Translation Basket and send the job to a local translator. Now it should work, and you should get no error.

Please let me know if it is working for you or if you need help with that.

Regards,
Itamar.

April 5, 2019 at 2:05 pm #3544765

Morfe

I tried your solution on a local installation but I only get error messages.
New archive with duplicator package
hidden link

April 7, 2019 at 3:05 pm #3552233

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Even with the new DUplicator package that you sent me, I can fix this issue on my local server. By repeating the same process that I've mentioned, I could send the job from the Translation Basket to a local translator and then translate it with ATE. Please see the attached screenshot. By looking at the screenshot that you have attached and the errors that show, I can guess that this is a problem on your local server. I think that the cURL error implies that it cannot connect to the internet or that some external connection is blocked.

Could you please try this simple fix on your live site and see if it works?

**** Important! Please make a DB backup before you proceed with those steps****

Regards,
Itamar.

April 10, 2019 at 10:23 am #3574923

Morfe

an you please try? still not working on live site I copied WPML_SITE_ID:ate to WPML_SITE_ID:global
original values where

WPML_SITE_ID:global
35343461-3631-5939-a138-653835393335

WPML_SITE_ID:ate
33356336-3562-5461-b566-616538326338

but not working here.

Kind regards, Debbie

April 10, 2019 at 7:28 pm #3580875

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

You have mistakenly inserted the WPML_SITE_ID:ate value into the WPML_SITE_ID:global value and it should have been the other way around. I've already fixed this issue on your site and was able to send the job from the Translation Basket to a local translator. Please see the attached screenshots.
Could you please check it and confirm that this issue is solved now?

Thanks,
Itamar.

April 16, 2019 at 9:13 am #3620303

Morfe

My issue is resolved now. Thank you!

April 16, 2019 at 9:46 am #3620581

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Great, I'm glad that it is solved now!
Good luck with your web projects 🙂
Itamar.