dolibarr-bugtrack
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-bugtrack] [Bug #1251] Only one extrafield is working in 3.5.0


From: Doliforge
Subject: [Dolibarr-bugtrack] [Bug #1251] Only one extrafield is working in 3.5.0 with Postgres
Date: Mon, 24 Feb 2014 18:24:24 +0100

Doliforge
Is this email not displaying correctly?
update email preferences.

Only one extrafield is working in 3.5.0 with Postgres

Latest modifications

2014-02-24 18:24 (Europe/Zurich)
Changes:
Additional Artifact AttachmentDolibarr - Companies module setup_2014-02-24_18-20-57.png (22.2 KiB)

Answer now

Snapshot

 Details
Submitted by:  André Schild (aschild) Submitted on:  2014-02-17 18:55
Last Modified On:  2014-02-24 18:23 
Summary:  Only one extrafield is working in 3.5.0 with Postgres
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.
Step to reproduce bug:  - Install dolibarr 3.5.0 with Postgresql
- Add TWO additional field to the users
- Create a new user
- Edit this new user
- Click "SAVE"

The error is shown in red on top of the browser screnn
Detected in version:  3.5.0 Category:  Core Problem
Severity:  5 - Major OS Type/Version:  Debian 7.0.4 64Bit
PHP version:  5.4.4-14+deb7u7 Database type and version:  PostgreSQL 9.1.11
 Status
Status:  Open Assigned to:  None
Resolution:  None 

Comments

André Schild 2014-02-24 18:23
Here is the definition:

Order Label Attribute code Type Size Unique Required
0 Localpath localpath String 255 No No Modify Delete
1 Mirsync Mirsync Boolean (Checkbox) No No Modify Delete


After some playing arround, I detected that the error disapperas, when the "Attribute code" for Mirsync is changed in all lowercase.
As soon as I add a attribute with Uppercase letters in the "Attribute code" it shows the errors again
Laurent Destailleur 2014-02-24 13:53
It seems you have two fields mirsync and Mirsync with different cases.
Can you go onto setup of extrafields of thirdparties and provide me a screenshot of setup page ?
André Schild 2014-02-17 19:04
Doing the same with a MySQL backend works as intended.
Looks like it's a bug in the PostgreSQL connector


reply via email to

[Prev in Thread] Current Thread [Next in Thread]