Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cfoellmann opened this issue Oct 23, 2020 · 2 comments
Open

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

cfoellmann opened this issue Oct 23, 2020 · 2 comments

Comments

@cfoellmann
Copy link
Contributor

cfoellmann commented Oct 23, 2020

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
Copy link
Contributor Author

@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
Copy link
Contributor Author

these things I identified so far:

ECMFILES have some issues:

  • DB table is ecm_files (not ecmfiles)

  • class files and module folder are not named the same -> issue

  • function show_whatChanged() has issues with db table names that diverge from class/element name

  • function makeCopy()` has also issues with the db table names

maybe mapping missformed element names should be externalized from the functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant