Fix setup Red Screen Of Death with bad DB query#1160
Fix setup Red Screen Of Death with bad DB query#1160nielsdrost7 merged 4 commits intoInvoicePlane:developmentfrom
Conversation
Complete InvoicePlane#1147 [Solve Red screen Of Death of bad DB query in CI3](https://stackoverflow.com/questions/7843406/codeigniter-how-to-catch-db-errors#54519533) Fix Call to undefined method CI_DB_mysqli_driver::_error_message() The _error_message() function unexist in CI3.1.13: `vendor/codeigniter/framework/system/database/DB_driver.php` + Indents: tab2spaces
|
#idea window.scrollTo(0, document.body.scrollHeight);Js from: https://stackoverflow.com/a/11715670 |
|
@sudwebdesign I like the solution. I would rather (also) to update the database properly and then continue. I think the version 1.5.12 was missing from the versions table and that causes the problem.
|
|
This error only occurs when:
and that's a very legitimate situation |
|
hi, @nielsdrost7
With this, it apply only if sql query it applicable and have no error at first time (after Note: The DB no stop on error because EDIT If no update need just show |
Always if no error Because The With this solution, all error are returned to the user (No Click |
|
@nielsdrost7 $this->db->db_debug = false;add $this->db->db_debug = IP_DEBUG;Good idea? |
Yep, go for it |
|
|
|
I'll merge it and make the final 1.6.2 release. |
## New Contributors Huge thanks to @sudwebdesign , @xam-ps and @AeroBytesNL for helping. Without you guys this release wouldn't have been possible * @sudwebdesign made their first contribution in #1149 * @VizardAlpha made their first contribution in #1129 * @pumpi made their first contribution in #1079 * @jmclaren7 made their first contribution in #1013 * @RobiNN1 made their first contribution in #1014 * @xeruf made their first contribution in #1061 * @NiklasSchmitt made their first contribution in #1073 * @redxtech made their first contribution in #1098 ## What's Changed * Add buttons on client view to delete note (Ajax) by @sudwebdesign in #1149 * Translate Client "Extra Field Title" to complete #1003 by @sudwebdesign in #1150 * [IP-1146]: after posting a Payments Form when amount > inv. total by @sudwebdesign in #1151 * [IP-1147]: Fix setup sql filenames by @sudwebdesign in #1152 * [IP-1130]: Added required input check on full page loaded to fix #1130 by @AeroBytesNL in #1155 * bug-fix-#1147-error-on-database-migration by @AeroBytesNL in #1159 * Fix setup Red Screen Of Death with bad DB query by @sudwebdesign in #1160 * **[IP-1128]**: Update QrCode.php wrong variable by @VizardAlpha in #1129 * Improve download function in #1127 * Chore: Fix upload_file function in #1141 * Show list of themes on Windows by @RobiNN1 in #1014 * [IP-1038]: Fix for issue 1038: Wrong translation string in setup by @naui95 in #1039 * [IP-1012]: Revert change to invoice_logo() by @jmclaren7 in #1013 * Slight improvements to README.md by @xeruf in #1061 * [IP-1070] by @naui95 in #1071 * [IP-1072] Fixed broken customer-link in projects-widget on dashboard. by @NiklasSchmitt in #1073 * [IP-1078]: ZUGFeRD Name should not be user name by @pumpi in #1079 * [IP-1006]: feature: payments v1.6.2 by @naui95 in #1046 * added information on theming by @naui95 in #1087 * [IP-1097]: add docker publish workflow by @redxtech in #1098 * [IP-841]: Copy Quote UI feedback by @Verony-makesIT in #932 * [IP-998]: copy all fields available in quotes by @naui95 in #1086 * [IP-1083]: Add pagination for tabs in client detail by @pumpi in #1084 * [IP-731]: Add another digit for quantity (new version) by @naui95 in #1112 * [IP-1003]: Add extra field title by nielsdrost7 in #1101 * add function to check post variables by nielsdrost7 in #1090 * [IP-1096] Payments array variable gets lost for invoices by nielsdrost7 in #1104 * Chore: add pint by nielsdrost7 in #1081 * [IP-1033] creation dates of invoices should never be changed by nielsdrost7 in #1040 * [IP-1034]: Fix error where default_language at some point switches to English by nielsdrost7 in #1035 * Make sure we don't get unintended output in our PDF files by nielsdrost7 in #1089 * [IP-1010]: Add php-dom and php-xml to the Dockerfile by nielsdrost7 in #1110 * Special project by nielsdrost7 in #1120 * [IP-1063]: Allowing for Dynamic Properties (**PHP 8.2**) by nielsdrost7 in #1117 Co-authored-by: Thomas Ingles Co-authored-by: AutiCodes Co-authored-by: AeroBytes Co-authored-by: naui95 Co-authored-by: VeRony Co-authored-by: Marc Heiduk Co-authored-by: Róbert Kelčák Co-authored-by: John Mclaren Co-authored-by: Janek Co-authored-by: Niklas Co-authored-by: stephan4p Co-authored-by: pumpi Co-authored-by: der-peer Co-authored-by: Nathan Mattes Co-authored-by: Kevin Joudrier Co-authored-by: Gabe Dunn Co-authored-by: VizardAlpha
Huge thanks to @sudwebdesign , @xam-ps and @AeroBytesNL for helping. Without you guys this release wouldn't have been possible * @sudwebdesign made their first contribution in InvoicePlane#1149 * @VizardAlpha made their first contribution in InvoicePlane#1129 * @pumpi made their first contribution in InvoicePlane#1079 * @jmclaren7 made their first contribution in InvoicePlane#1013 * @RobiNN1 made their first contribution in InvoicePlane#1014 * @xeruf made their first contribution in InvoicePlane#1061 * @NiklasSchmitt made their first contribution in InvoicePlane#1073 * @redxtech made their first contribution in InvoicePlane#1098 * Add buttons on client view to delete note (Ajax) by @sudwebdesign in InvoicePlane#1149 * Translate Client "Extra Field Title" to complete InvoicePlane#1003 by @sudwebdesign in InvoicePlane#1150 * [IP-1146]: after posting a Payments Form when amount > inv. total by @sudwebdesign in InvoicePlane#1151 * [IP-1147]: Fix setup sql filenames by @sudwebdesign in InvoicePlane#1152 * [IP-1130]: Added required input check on full page loaded to fix InvoicePlane#1130 by @AeroBytesNL in InvoicePlane#1155 * bug-fix-InvoicePlane#1147-error-on-database-migration by @AeroBytesNL in InvoicePlane#1159 * Fix setup Red Screen Of Death with bad DB query by @sudwebdesign in InvoicePlane#1160 * **[IP-1128]**: Update QrCode.php wrong variable by @VizardAlpha in InvoicePlane#1129 * Improve download function in InvoicePlane#1127 * Chore: Fix upload_file function in InvoicePlane#1141 * Show list of themes on Windows by @RobiNN1 in InvoicePlane#1014 * [IP-1038]: Fix for issue 1038: Wrong translation string in setup by @naui95 in InvoicePlane#1039 * [IP-1012]: Revert change to invoice_logo() by @jmclaren7 in InvoicePlane#1013 * Slight improvements to README.md by @xeruf in InvoicePlane#1061 * [IP-1070] by @naui95 in InvoicePlane#1071 * [IP-1072] Fixed broken customer-link in projects-widget on dashboard. by @NiklasSchmitt in InvoicePlane#1073 * [IP-1078]: ZUGFeRD Name should not be user name by @pumpi in InvoicePlane#1079 * [IP-1006]: feature: payments v1.6.2 by @naui95 in InvoicePlane#1046 * added information on theming by @naui95 in InvoicePlane#1087 * [IP-1097]: add docker publish workflow by @redxtech in InvoicePlane#1098 * [IP-841]: Copy Quote UI feedback by @Verony-makesIT in InvoicePlane#932 * [IP-998]: copy all fields available in quotes by @naui95 in InvoicePlane#1086 * [IP-1083]: Add pagination for tabs in client detail by @pumpi in InvoicePlane#1084 * [IP-731]: Add another digit for quantity (new version) by @naui95 in InvoicePlane#1112 * [IP-1003]: Add extra field title by nielsdrost7 in InvoicePlane#1101 * add function to check post variables by nielsdrost7 in InvoicePlane#1090 * [IP-1096] Payments array variable gets lost for invoices by nielsdrost7 in InvoicePlane#1104 * Chore: add pint by nielsdrost7 in InvoicePlane#1081 * [IP-1033] creation dates of invoices should never be changed by nielsdrost7 in InvoicePlane#1040 * [IP-1034]: Fix error where default_language at some point switches to English by nielsdrost7 in InvoicePlane#1035 * Make sure we don't get unintended output in our PDF files by nielsdrost7 in InvoicePlane#1089 * [IP-1010]: Add php-dom and php-xml to the Dockerfile by nielsdrost7 in InvoicePlane#1110 * Special project by nielsdrost7 in InvoicePlane#1120 * [IP-1063]: Allowing for Dynamic Properties (**PHP 8.2**) by nielsdrost7 in InvoicePlane#1117 Co-authored-by: Thomas Ingles Co-authored-by: AutiCodes Co-authored-by: AeroBytes Co-authored-by: naui95 Co-authored-by: VeRony Co-authored-by: Marc Heiduk Co-authored-by: Róbert Kelčák Co-authored-by: John Mclaren Co-authored-by: Janek Co-authored-by: Niklas Co-authored-by: stephan4p Co-authored-by: pumpi Co-authored-by: der-peer Co-authored-by: Nathan Mattes Co-authored-by: Kevin Joudrier Co-authored-by: Gabe Dunn Co-authored-by: VizardAlpha
Description
After tested (with real data backup of 1.5.11 version) i get an error
CI say
Call to undefined method CI_DB_mysqli_driver::_error_message()Complete Error on database migration on 1.6.2 upgrade #1147
Solve Red screen Of Death of bad DB query in
CI3
Fix Call to undefined method CI_DB_mysqli_driver::_error_message()
The _error_message() function unexist in CI3.1.13:
vendor/codeigniter/framework/system/database/DB_driver.phpIndents: tab2spaces
Motivation and Context
Does it solve a provlem with setup.
Try againbutton appear,++
Call to undefined method CI_DB_mysqli_driver::_error_message()or++ Red Screen Of Death
Screenshots (if appropriate):
To test:
1 Remove in ip_version the fourth last lines

2 Go to index.php/setup and continue to upgrade_database

3 Continue

4 Rude Test Remove all sql versions, (Just only 1.0.0 in list of

ip_versiontable)This is just end of page, but before are numerous errors, but if click on Try-again return same as image 3 (Continue).
Pull Request Checklist
Issue Type (Please check one or more)