Tables install/uninstall error in DaDaBIK 7.3

dwr

New member
Hi. Tables inclusion error when trying to install new table with "[08] Error: during query execution".

DaDaBIK version 7.3 pro
PHP Version: 5.3.28
mysql version: 5.5.47
Web server: Apache/2.4.18 (Unix)
Client: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
 

eugenio

Administrator
Staff member
Yes, I was up to publish a patch about it, there is a bug in DaDaBIK 7.3. To fix it: open the file table_inclusion.php and replace this string:

table_name_2=

with:

tablename_2=

you should find just two occurrences, in line 274 and 277.
 

juergen_mueller

DaDaBIK Guru
Hi, Eugenio


I just updated one of my applications to 7.3 enterprise. I found many occurrences of table_name_2 in my table_inclusion.php. Is that ok?

Regards

Juergen
 

PierreM48

New member
Hello,
My config : DaDaBIK 7.3.1
PHP Version: 5.3.17
postgres version: 9.4.4
Web server: Apache/2.2.29 (Linux/SUSE)
Client: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

I inserted the patch above (tablename_2 iso table_name_2) but it does'nt work for me. Here is the SQL error message :

[08] Error: during query execution. SELECT pg_attribute.attname FROM pg_index, pg_class, pg_attribute WHERE pg_class.oid = ''::regclass AND indrelid = pg_class.oid AND pg_attribute.attrelid = pg_class.oid AND pg_attribute.attnum = any(pg_index.indkey)
The DBMS server said: SQLSTATE[42602]: Invalid name: 7 ERROR: invalid name syntax LINE 1: ...ndex, pg_class, pg_attribute WHERE pg_class.oid = ''::regcla... ^

As I can understand, the function get_unique_field_db receives an empty $table_name as argument.

Thanks for your answer.

Pierre
 

eugenio

Administrator
Staff member
Hello,
if you are running dadabik 7.3.1 you don't need any patch, the problem was with dadabik 7.3.
Are you experiencing this error during table installation or when?
 

PierreM48

New member
I get the error when I click "Install" in the Table inclusion menu, for any table with or without primary key.

To avoid the problem, I manually insert the table in dadabik_table_list, then I go to "DB Synchro" to add the fields.

Pierre
 

eugenio

Administrator
Staff member
Hello,
are you sure you correctly upgrade version 7.3 to 7.3.1 following the instructions?
Installing a table using install+db synchro is not the right way and could lead to unexpected results.
 
Top