Invision Community 5: A video walkthrough creating a custom theme and homepage By Matt Thursday at 04:02 PM
teraßyte Posted July 31, 2022 Posted July 31, 2022 (edited) I hit the error updating an old 3.1.4 site. The problem is that some packages have a NULL or empty string value for the p_base_price column in the nexus_packages table instead of 0. The upgrade process stops because MYSQL complains about a "Truncated incorrect DOUBLE value" error. Open the file \applications\nexus\setup\upg_40000\upgrade.php and fine the code on lines 585-594: public function step14() { $offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0; $select = \IPS\Db::i()->select( '*', 'nexus_packages', NULL, 'p_id', array( $offset, 50 ) ); if ( \count( $select ) ) { foreach ( $select as $row ) { \IPS\Lang::saveCustom( 'nexus', "nexus_package_{$row['p_id']}", $row['p_name'] ); \IPS\Lang::saveCustom( 'nexus', "nexus_package_{$row['p_id']}_assoc", $row['p_assoc_error'] ); I simply added this code below right at the start of the foreach cycle to fix the issue: # Change NULL or EMPTY STRING prices to 0 to avoid "Truncated incorrect DOUBLE value" errors $row['p_base_price'] = empty($row['p_base_price']) ? 0 : $row['p_base_price']; Edited July 31, 2022 by teraßyte
Recommended Posts