Tcpdf errors

nferrara

New member
Hello,

When I try to generate a pdf document (without template), I receive :
Warning: Undefined array key "cols" in /home2/................./include/tcpdf/tcpdf.php on line 16644
Warning
: Undefined array key "thead" in /home2/............./include/tcpdf/tcpdf.php on line 16676
Warning
: Undefined variable $cellspacingx in /home2/............/include/tcpdf/tcpdf.php on line 18304
Warning
: Undefined variable $cellspacing in /home2/............../include/tcpdf/tcpdf.php on line 18371
Warning
: Trying to access array offset on value of type null in /home2/........................../include/tcpdf/tcpdf.php on line 18371

What to do ?
Thanks.

Your current DaDaBIK version​

You are using DaDaBIK version 11.12-Elba enterprise, installed on 19-04-2024

System info
PHP Version: 8.1.27
mysql version: 10.6.17-MariaDB
Web server: Apache​

 

eugenio

Administrator
Staff member
Hello,
did you change any DaDaBIK file except from config_custom.php?
Could you try a fresh installation, using the original files downloaded and changing just config_custom.php, on a simple (1 table ) DB and see if you get the same error?
 

nferrara

New member
Hello,
Thanks for your reply.
A fresh installation is OK without this pcpdf problem !
I think I used, in the problematic installation, the same procedure as this new ok installation; I don't understand ; no worries: there will be no pdf access in this problematic application (I removed the button :)).
Another thing: I experienced that the import (ods, csv) of data is not possible / not compatible with its "select_single" definition.
Is this new functionality planned in the medium term?
Thanks.
Sincerely
 

nferrara

New member
I experienced what you indicated in :
https://dadabik.com/index.php?function=show_documentation#import_from_csv
----------------
For select_single* and select_multiple* lookup fields, DaDaBIK expects to receive the value of the primary key, not the value of the linked field. So if you have a products table:
products (id_product, name_product, id_brand)
where id_brand is a select_single lookup field, DaDaBIK expects to receive, for example, "5" (the id of the brand), and not "Apple".
-----------------

My example :
3 tables:

1) table "problematiques" (P) :
- id_problematiques : primary key
- problematique : varchar

2) table "techniques" (T) :
- id_techniques : primary key
- technique : varchar

3) table "correspondances" (C) :
- id_correspondances : primary key
- problemantique : required ; select_single => table (P) ...
- technique : required ; select_single => table (T)

In web direct entry one by one in table (C) : everything is OK (with drop-down lists)

In massive import (.ods) in table (C) with id_problematiques and id_techniques values : everything is OK :
-> sql table (C) contains id_problematiques and id_techniques values
-> queries return problematique and technique varchar corresponding values
But in massive import in table (C) with problematique and technique varchar values : nothing is OK :
-> sql table (C) contains problematique and technique varchar values
-> queries return blank

So, your "https://dadabik.com/index.php?function=show_documentation#import_from_csv" is right ?

Thanks
Best regards
 

eugenio

Administrator
Staff member
The documentation is correct, but this doesn't imply that importing from select_single fields is not possible / not compatible as you stated.

The documentation refers to lookup fields (all lookup fields): if in your xls you don't have the value of the PK, you can use a transformation function that, through a query, get the PK value before inserting the value in the DB (check transformation functions in the documentation).
For select_single fields that are not lookup, this is typically not needed.

Best,
 
Top