ATM-Consulting / dolibarr_module_history

donne un historique plus poussé et complet pour un objet
9 stars 7 forks source link

DB error if option "save for restore" is active #14

Open cfoellmann opened 4 years ago

cfoellmann commented 4 years ago

When I activate the option to "save deletions for restore" the history just gives a DB error in the list.

Fatal error: Uncaught Error: Call to a member function fetch_object() on boolean in /home/runcloud/webapps/dolibarr-testing/htdocs/core/db/mysqli.class.php:304 
Stack trace: 
#0 /home/runcloud/webapps/dolibarr-testing/htdocs/debugbar/class/TraceableDB.php(682): DoliDBMysqli->fetch_object(false) 
#1 /home/runcloud/webapps/dolibarr-testing/htdocs/custom/history/class/history.class.php(123): TraceableDB->fetch_object(false) 
#2 /home/runcloud/webapps/dolibarr-testing/htdocs/custom/history/history.php(135): DeepHistory->show_whatChanged(Object(TraceableDB)) 
#3 {main} thrown in /home/runcloud/webapps/dolibarr-testing/htdocs/core/db/mysqli.class.php on line 304
cfoellmann commented 3 years ago

@atm-john I looked at the code and it seems that the tables for saving the deleted elements are not being created. Is this not a feature that should be not-broken?

cfoellmann commented 3 years ago

these things I identified so far:

ECMFILES have some issues:

maybe mapping missformed element names should be externalized from the functions