When when I attempted to assign a translation job to a translator, the form submitted and then the translation dashboard no longer displayed any content. My translator user could not see the assigned job either. After logging the admin out and then back in, the content on the translation dashboard was back. At this point I could see that the translation job had never been assigned to the translator, so I headed over to the recent log entries and found the following was occurring:

-1 The Website ID is not set

I dug into the source code a little and found the error originates in "icl_core.webservices.inc" in the "icl_core_call_service" function. Specifically, the "icl_core_website_id" variable seems to not be set after attempting to assign a translation job.

I simply removed that if statement to test and see what would happen and then the next if statement threw the error "-2 The Accesskey is not set."

So it seems like the uri variables aren't getting set properly for me somehow. Further investigation has revealed that the error is thrown every time I visit the page, regardless of whether translatable content is listed or not, so I can't say for certain that the content not being listed after an attempted translation assignment is related to this error or not.

Comments

icanlocalize’s picture

Assigned: Unassigned » jozik
Status: Active » Needs work
Anonymous’s picture

Assigned: jozik » Unassigned
Status: Needs work » Active

After attempting a downgrade to beta 5, I have discovered that the problem persists. This is odd, because I didn't have this issue the last time I was testing out beta 5. I am running into this issue on a localhost so I may try on my development server and see what happens.

It does appear to also be happening on my development server so a local issue is not the problem.

Anonymous’s picture

I solved the issue with the content disappearing. The language neutral filter doesn't seem to work properly, or at least how I'd expect. If a piece of content hasn't had a language assigned to it yet and is listed as language nuetral, then it can't be assigned for translation. However, no warning is given so the user doesn't know why the assignment hasn't occurred. Furthermore, the content listing is now trying to list english documents, of which I did not have any yet. The language nuetral filter didn't seem to find any content when I attempted to select that.

So. Sorry for the confusion. This issue is really two separate things.

1. The "-1 The Website ID is not set" log error which is still occurring but doesn't seem to effect anything.
2. No error message when attempting to assign translation for content which does not currently have a language.

icanlocalize’s picture

Assigned: Unassigned » jozik

Thanks. We'll fix the PHP warning and add a notice about language neutral.

brucepearson’s picture

Status: Active » Fixed

These have now been fixed and will be available in the next release.

We have added a message about language neutral language. Content that is language neutral can't be translated and the language of the content needs to be specified before it can be translated.

brucepearson’s picture

Status: Fixed » Closed (fixed)
ikeigenwijs’s picture

Version: 6.x-1.0-beta6 » 6.x-1.21
Status: Closed (fixed) » Needs work

I see the same error in watchdog:
icl_core 03/03/2011 - 13:51 -1 The Website ID is not set mdcokere
not an admin user

drupal 6.20

Sweetchuck’s picture

I confirm, this bug is still exists

alexbk66-’s picture

I get this error twice when I create new blog entry.

totocol’s picture

I am also getting this error on Drupal 6.20

jvieille’s picture

Version: 6.x-1.21 » 6.x-1.22

Also getting this error D6.20, TM 6.x-1.22
Appears when editing an untranslated node

fmmribeiro’s picture

Version: 6.x-1.22 » 6.x-1.28

Also getting this error D6.20, TM 6.x-1.28

beck24’s picture

Ditto.

troyer’s picture

Version: 6.x-1.28 » 6.x-1.30

The bug has crawled up again. I was trying to add content, language was set to English, after submitting my form I was presented with a blank form and the content wasn't saved. In the error log it says "Type: icl_core / Message: -1 The Website ID is not set".

I'm using PHP 5.3.2 and Drupal 6.25.

Alpinist1974’s picture

-1 The Website ID is not set.

I'm experiencing this issue as well, and it seems to precede my site hanging up and crashing, using ICL_core 6x-1.30

I'm running drupal 6.25 and PHP 5.3.2.

millenniumtree’s picture

Same here. Using local translation only, no web services.
I wonder if this should be reassigned? It doesn't appear jozik has committed anything in a while.

millenniumtree’s picture

It appears there are multiple calls to unnecessary functions.

icl_content.module: theme_icl_content_fancy_status()
$targets = _icl_core_available_targets (FALSE, $node->language);
$targets = _icl_core_available_targets ();
The $targets variable is never used in theme_icl_content_fancy_status()

icl_content.module: icl_content_alter_node_add_form()
$langs = icl_core_available_languages ();
$targets = _icl_core_available_targets ();
Again, neither $langs, nor $targets is ever used.

Commenting out those 4 lines seems to prevent the error, but I still get a WSOD on node save.

gateway69’s picture

Has this been resolved, im also going though our db logs and I see this pop up every so often.

Looking at the variables set I do not see icl_core_website_id, so if your not using their service, aka local translation you will be set with a -1 value or not set at all.

This is all set up in icl_core.settings.inc