Description: | When I add a single extra field to a module (Users or Societe) in 3.5.0 with the postgres driver,
then the creation of a entry works fine.
But as soon as I edit the entry and try to save it, it throws the error "42701" Column specified multiple times.
The log shows this for societe:
2014-02-17 18:40:22 DEBUG 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 functions2::check_value result=0
2014-02-17 18:40:22 INFO 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 mod_codeclient_elephant::verif type=0 result=0
2014-02-17 18:40:22 INFO 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 Societe::update verify ok
2014-02-17 18:40:22 INFO 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 Societe::Update sql=UPDATE llx_societe SET nom = '
Aarboard AG',ref_ext = null,datea = '2014-02-17 18:40:22',address = '',zip = null,town = null,fk_departement = '0',fk_
pays = '6',phone = null,fax = null,email = null,skype = null,url = "" = '',siret = '',ape = '',idprof4
= '',idprof5 = '',idprof6 = '',tva_assuj = '1',tva_intra = '',status = 1,localtax1_assuj = null,localtax2_assuj = nul
l,capital = 0,prefix_comm = null,fk_effectif = null,fk_typent = '2',fk_forme_juridique = null,client = 1,fournisseur =
0,barcode = null,default_lang = null,logo = null, code_client = 'C000001', code_compta = null, fk_user_modif = '2' WH
ERE rowid = '1'
2014-02-17 18:40:22 INFO 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 ExtraFields::fetch_name_optionals_label sql=SELECT
rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos FROM llx_extrafields WHERE entity IN (0,1)
AND elementtype = 'societe' ORDER BY pos
2014-02-17 18:40:22 INFO 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 Societe::insertExtraFields delete sql=DELETE FROM
llx_societe_extrafields WHERE fk_object = 1
2014-02-17 18:40:22 INFO 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 Societe::insertExtraFields insert sql=INSERT INTO
llx_societe_extrafields (fk_object,localpath,mirsync,Mirsync) VALUES (1,'www.aarboard.ch','0',null)
2014-02-17 18:40:22 WARNING 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 DoliDBPgsql::query SQL error usesavepoint = 0 - I
NSERT INTO llx_societe_extrafields (fk_object,localpath,mirsync,Mirsync) VALUES (1,'www.aarboard.ch','0',null) - FEHLE
R: 42701: Spalte »mirsync« mehrmals angegeben
ZEILE 1: ..._societe_extrafields (fk_object,localpath,mirsync,Mirsync) V...
^
ORT: checkInsertTargets, parse_target.c:916 => DB_ERROR_COLUMN_ALREADY_EXISTS
2014-02-17 18:40:22 ERR 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 Societe::update FEHLER: 42701: Spalte »mirsync«
mehrmals angegeben
ZEILE 1: ..._societe_extrafields (fk_object,localpath,mirsync,Mirsync) V...
^
ORT: checkInsertTargets, parse_target.c:916
2014-02-17 18:40:22 DEBUG 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 ROLLBACK Transaction
or for the users:
2014-02-17 18:44:09 DEBUG 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 User::update sql=UPDATE llx_user SET fk_member =n
ull where rowid = 2
2014-02-17 18:44:09 INFO 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 ExtraFields::fetch_name_optionals_label sql=SELEC
T rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos FROM llx_extrafields WHERE entity IN (0,1
) AND elementtype = 'user' ORDER BY pos
2014-02-17 18:44:09 INFO 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 User::insertExtraFields delete sql=DELETE FROM l
lx_user_extrafields WHERE fk_object = 2
2014-02-17 18:44:09 INFO 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 User::insertExtraFields insert sql=INSERT INTO l
lx_user_extrafields (fk_object,flag1,flag2,Flag1,Flag2) VALUES (2,'1','1',null,null)
2014-02-17 18:44:09 WARNING 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 DoliDBPgsql::query SQL error usesavepoint = 0 -
INSERT INTO llx_user_extrafields (fk_object,flag1,flag2,Flag1,Flag2) VALUES (2,'1','1',null,null) - FEHLER: 42701: Sp
alte »flag1« mehrmals angegeben
ZEILE 1: ... INTO llx_user_extrafields (fk_object,flag1,flag2,Flag1,Flag...
^
ORT: checkInsertTargets, parse_target.c:916 => DB_ERROR_COLUMN_ALREADY_EXISTS
2014-02-17 18:44:09 ERR 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 User::update FEHLER: 42701: Spalte »flag1« mehr
mals angegeben
ZEILE 1: ... INTO llx_user_extrafields (fk_object,flag1,flag2,Flag1,Flag...
^
ORT: checkInsertTargets, parse_target.c:916
2014-02-17 18:44:09 ERR 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 User::update error=FEHLER: 42701: Spalte »flag1«
mehrmals angegeben
ZEILE 1: ... INTO llx_user_extrafields (fk_object,flag1,flag2,Flag1,Flag...
^
ORT: checkInsertTargets, parse_target.c:916
2014-02-17 18:44:09 DEBUG 2a02:2528:ff77:200:1dd1:571b:1a3f:3327 ROLLBACK Transaction
As soon as I remove the second additional field it starts to work again. |
Looks like it's a bug in the PostgreSQL connector