After I submit or edit "Story" I get following SQL error:

user warning: Duplicate entry '0' for key 1 query: INSERT INTO localizeruser (uid, contentlocales, switch_uicontent) VALUES (0, '', 0) in .../includes/database.mysql.inc on line 172.

After submit or edit content is associated with "Any" language.

After I click on "Translations" I get following error:

    * user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND locale=hr' at line 1 query: SELECT * FROM localizernode WHERE pid= AND locale=hr in .../includes/database.mysql.inc on line 172.
    * user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND locale=en' at line 1 query: SELECT * FROM localizernode WHERE pid= AND locale=en in .../hut/includes/database.mysql.inc on line 172.

I tried to execute
INSERT INTO localizeruser (uid, contentlocales, switch_uicontent) VALUES (0, '', 0);
SQL code in phpmyadmin and get following error:

Error

SQL query:

INSERT INTO localizeruser( uid, contentlocales, switch_uicontent )
VALUES ( 0, '', 0 )

MySQL said: Documentation
#1062 - Duplicate entry '0' for key 1

Comments

Wuk’s picture

I forgot to say that I'm using:
PHP 4.4.4
MySQL 4.0.27

Wuk’s picture

I get the same error with "Page" and custom content type which I called "News".

Roberto Gerola’s picture

Status: Active » Fixed

First of all : many thanks for your effort in the debugging.
It is very useful for me.
The new version has so many changes, so testing and debugging is fundamental.

This error should be fixed in cvs now.

Wuk’s picture

Status: Fixed » Active

Thank you for creating this great module.

Now I can assign language (and translation) to only one node.
Problem is that pid is always 0.
Here is error that I get:

user warning: Duplicate entry 'hr-0' for key 2 query: INSERT INTO localizernode (nid, pid, locale) VALUES (5, 0, 'hr') in .../includes/database.mysql.inc on line 172.

in that SQL code 5 is node id, and that is correct (if it should be node id).

Could you please add ID tag to files so I can now which version I.'m using, without ID tag I have to check all changed files, and some of them I already have (I download latest development snapshot, and only changed files from CVS).

Roberto Gerola’s picture

It should be fixed now.
You need models/localizernode.php, version 1.2.2.5

Thanks

Mojah’s picture

I'm getting the same error after installing the cvs file...

user warning: Unknown column 'nl' in 'where clause' query: localizernode_find SELECT * FROM localizernode WHERE pid=3562 AND locale=nl in /home/domain/domains/domain.com/public_html/includes/database.mysql.inc on line 172.

I get the same error for each language.

Thanks

Mojah’s picture

http://drupal.org/node/126903

This seemed to work.

Roberto Gerola’s picture

Please, update also localizernode.module.
I've checked again all the calls and they seem to be correct.

Let me know.

Thanks

Wuk’s picture

It work now.

Thank you.

Roberto Gerola’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)