Jump to content
thirty bees forum
  • 0

URGENT: Suddenly unable to save any products out of the blue, without any specific change made to our site


Question

Posted (edited)

I cannot reach my developper but this odd problem started out of the blue yesterday, with no specific actions on our part.  We are now unable to save any products.  The logs seems to show a string of modules involved but disabling them still gives us an error when saving and the data does not make it to the database at all.  If someone can help us figure out what the issue is, we are really stalled right now.

I have tried disabling all overrides, that still generates a 500 error.

If I disable the third party modules and only use TB modules, I am still unable to save, albeit without a 500 error.  I get this instead: An error occurred while updating an object. product ()

Thank you.

Here is what the exception reads at (with all the modules on):

Call to undefined function mysql_error()

in file modules/psseobooster/psseobooster.php at line 2522

Source file: modules/psseobooster/psseobooster.php

2503:			if (version_compare(constant('_PS_VERSION_'),'1.6','>'))
2504:				$this->context->controller->addJS($this->_path.'/js/psseobooster.js');
2505:			else
2506:				$this->context->controller->addJS($this->_path.'/js/psseobooster15.js');
2507:		} else if ($this->context->controller->controller_name == 'AdminModules' && Tools::getValue('configure') == 'psseobooster'){
2508:			$this->context->controller->addCSS($this->_path.'/css/psseobooster.css');
2509:		}
2510:
2511:	}
2512:
2513:	public function hookActionProductUpdate($params)
2514:	{
2515:		// get all languages
2516:		// for each of them, store the target keyword!
2517:
2518:		$id_product = (int)Tools::getValue('id_product');
2519:		$languages = Language::getLanguages(true);
2520:		foreach ($languages as $lang) {
2521:			if(!Db::getInstance()->update('product_lang', array('target_keyword'=> pSQL(Tools::getValue('target_keyword_'.$lang['id_lang']))) ,'id_lang = ' . $lang['id_lang'] .' AND id_product = ' .$id_product ))
2522:				$this->context->controller->_errors[] = Tools::displayError('Error: ').mysql_error();
2523:		}
2524:
2525:		// then store indexation options
2526:		$noindex = Tools::getValue('noindex') ? 'noindex' : '';
2527:		$nofollow = Tools::getValue('nofollow') ? 'nofollow' : '';
2528:		$seoindex = $noindex . ',' . $nofollow;
2529:		$force410 = Tools::getValue('force410');
2530:		if(!Db::getInstance()->update('product_shop', array('seoindex' => pSQL($seoindex), 'seo410' => (int)$force410), 'id_product = '. $id_product .' AND id_shop = ' . $this->context->shop->id))
2531:			$this->context->controller->_errors[] = Tools::displayError('Error: ').mysql_error();
2532:

Stack trace

1. classes/Hook.php:769  source psSeoBooster->hookActionProductUpdate(arguments) 
750:     *
751:     * @throws PrestaShopDatabaseException
752:     * @throws PrestaShopException
753:     * @since   1.0.0
754:     * @version 1.0.0 Initial version
755:     */
756:    public static function coreCallHook($module, $method, $params)
757:    {
758:        // Define if we will log modules performances for this session
759:        if (Module::$_log_modules_perfs === null) {
760:            $modulo = _PS_DEBUG_PROFILING_ ? 1 : Configuration::get('PS_log_modules_perfs_MODULO');
761:            Module::$_log_modules_perfs = ($modulo && mt_rand(0, $modulo - 1) == 0);
762:            if (Module::$_log_modules_perfs) {
763:                Module::$_log_modules_perfs_session = mt_rand();
764:            }
765:        }
766:
767:        // Immediately return the result if we do not log performances
768:        if (!Module::$_log_modules_perfs) {
769:            return $module->{$method}($params);
770:        }
771:
772:        // Store time and memory before and after hook call and save the result in the database
773:        $timeStart = microtime(true);
774:        $memoryStart = memory_get_usage(true);
775:
776:        // Call hook
777:        $r = $module->{$method}($params);
778:
779:        $timeEnd = microtime(true);
2. override/classes/Hook.php:23  source HookCore::coreCallHook(arguments) 
4:      /*
5:    * module: Litespeed 
6:    * date: 2021-02-18 11:36:58
7:    * version: v1.2.7
8:    */  
9:   public static function coreCallHook($module, $method, $params)
10:    {
11:        if (defined('_LITESPEED_DEBUG_')
12:            && _LITESPEED_DEBUG_ >= LiteSpeedCacheLog::LEVEL_HOOK_DETAIL) {
13:            $mesg = '  in hook coreCallHook ' . get_class($module) . ' - ' . $method;
14:            if ($method == 'hooklitespeedEsiBegin') {
15:                $mesg .= ' params m=' . $params['m'] . ' field=' . $params['field'];
16:                if (isset($params['hook']))
17:                    $mesg .= ' hook=' . $params['hook'];
18:                if (isset($params['tpl']))
19:                    $mesg .= ' tpl=' . $params['tpl'];
20:            }
21:            LiteSpeedCacheLog::log($mesg, LiteSpeedCacheLog::LEVEL_HOOK_DETAIL);
22:        }
23:        $html = parent::coreCallHook($module, $method, $params);
24:        if (defined('_LITESPEED_CACHE_')
25:                && ($marker = LiteSpeedCache::injectCallHook($module, $method)) !== false) {
26:            $html = $marker . $html . LiteSpeedCache::ESI_MARKER_END;
27:        }
28:        return $html;
29:    }
30:    public static function coreRenderWidget($module, $hook_name, $params)
31:    {
32:        if (defined('_LITESPEED_DEBUG_')
33:                && _LITESPEED_DEBUG_ >= LiteSpeedCacheLog::LEVEL_HOOK_DETAIL) {
3. classes/Hook.php:471  source Hook::coreCallHook(arguments) 
452:
453:            if ($usePush && !$moduleInstance->allow_push) {
454:                continue;
455:            }
456:            // Check which / if method is callable
457:            $hookCallable = is_callable([$moduleInstance, 'hook'.$hookName]);
458:            $hookRetroCallable = is_callable([$moduleInstance, 'hook'.$retroHookName]);
459:
460:            if ($hookCallable || $hookRetroCallable) {
461:
462:                if (Module::preCall($moduleInstance->name)) {
463:                    $hookArgs['altern'] = ++$altern;
464:
465:                    if ($usePush && isset($moduleInstance->push_filename) && file_exists($moduleInstance->push_filename)) {
466:                        Tools::waitUntilFileIsModified($moduleInstance->push_filename, $moduleInstance->push_time_limit);
467:                    }
468:
469:                    // Call hook method
470:                    if ($hookCallable) {
471:                        $display = Hook::coreCallHook($moduleInstance, 'hook' . $hookName, $hookArgs);
472:                    } elseif ($hookRetroCallable) {
473:                        $display = Hook::coreCallHook($moduleInstance, 'hook' . $retroHookName, $hookArgs);
474:                    }
475:
476:                    // Live edit
477:                    if (!$arrayReturn && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad')
478:                        && Tools::getValue('liveToken') == Tools::getAdminToken(
479:                            'AdminModulesPositions'
480:                            . (int)Tab::getIdFromClassName('AdminModulesPositions') . (int)Tools::getValue('id_employee')
481:                        )
4. classes/Hook.php:288  source HookCore::execWithoutCache(arguments) 
269:     * @param int    $idShop          If specified, hook will be execute the shop with this ID
270:     *
271:     * @throws PrestaShopException
272:     *
273:     * @return string|array modules output
274:     *
275:     * @since   1.0.0
276:     * @version 1.0.0 Initial version
277:     */
278:    public static function exec(
279:        $hookName,
280:        $hookArgs = [],
281:        $idModule = null,
282:        $arrayReturn = false,
283:        $checkExceptions = true,
284:        $usePush = false,
285:        $idShop = null
286:    ) {
287:        if ($arrayReturn || !PageCache::isEnabled() || PageCacheKey::get() === false) {
288:            return static::execWithoutCache($hookName, $hookArgs, $idModule, $arrayReturn, $checkExceptions, $usePush, $idShop);
289:        }
290:
291:        if (!$moduleList = static::getHookModuleExecList($hookName)) {
292:            return '';
293:        }
294:
295:        $return = '';
296:
297:        if (!$idModule) {
298:            $cacheEntry = PageCache::get();
5. modules/ets_superspeed/classes/ext/ets_hook:59  source HookCore::exec(arguments) 
40:        'displayProductTabContent' => array('from' => '1.7.0.0'),
41:        'displayProductTab' => array('from' => '1.7.0.0'),
42:    );
43:    public static function exec16($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true,
44:                                $use_push = false, $id_shop = null)
45:    {
46:        if (defined('PS_INSTALLATION_IN_PROGRESS')) {
47:            return;
48:        }
49:        if(Tools::getValue('ajax')) {
50:            $ajax=true;
51:        }
52:        else
53:            $ajax=false;
54:        if(self::_checkPageCache()&& !$ajax)
55:            return HookCore::exec($hook_name,$hook_args,$id_module,$array_return,$check_exceptions,$use_push,$id_shop);
56:        $page_cache = Configuration::get('ETS_SPEED_ENABLE_PAGE_CACHE') && Configuration::get('ETS_SPEED_PAGES_TO_CACHE') && Tools::getValue('controller') &&  in_array(Tools::getValue('controller'),explode(',',Configuration::get('ETS_SPEED_PAGES_TO_CACHE'))); 
57:        $controller = Context::getContext()->controller;
58:        if(!isset($controller->controller_type) || ($controller->controller_type!='modulefront' && $controller->controller_type!='front'))
59:            return HookCore::exec($hook_name,$hook_args,$id_module,$array_return,$check_exceptions,$use_push,$id_shop);
60:        static $disable_non_native_modules = null;
61:        if ($disable_non_native_modules === null) {
62:            $disable_non_native_modules = (bool)Configuration::get('PS_DISABLE_NON_NATIVE_MODULE');
63:        }
64:        if (($id_module && !is_numeric($id_module)) || !Validate::isHookName($hook_name)) {
65:            throw new PrestaShopException('Invalid id_module or hook_name');
66:        }
67:        if (!$module_list = Hook::getHookModuleExecList($hook_name)) {
68:            return '';
69:        }
6. override/classes/Hook.php:61  source Ets_Hook::exec16(arguments) 
42:        return $html;
43:    }
44:    /*
45:    * module: ets_superspeed
46:    * date: 2021-02-28 16:53:39
47:    * version: 1.2.4
48:    */
49:    public static function exec($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true,$use_push = false, $id_shop = null,$chain=false)
50:    {
51:        require_once(dirname(__FILE__).'/../../modules/ets_superspeed/classes/ext/ets_hook');
52:        $class='Ets_Hook';
53:        $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
54:        if (Tools::version_compare(_PS_VERSION_,'1.7','>=')) {
55:            $method='exec17';
56:            return call_user_func_array(array($class, $method),array($hook_name,$hook_args,$id_module,$array_return,$check_exceptions,$use_push,$id_shop,$chain,$backtrace));
57:        }
58:        else
59:        {
60:            $method='exec16';
61:            return call_user_func_array(array($class, $method),array($hook_name,$hook_args,$id_module,$array_return,$check_exceptions,$use_push,$id_shop));
62:        }
63:    }
64:}
7. classes/Product.php:5178  source Hook::exec(arguments) 
5159:
5160:        $return = parent::update($nullValues);
5161:
5162:        $this->setGroupReduction();
5163:
5164:        // Sync stock Reference, EAN13 and UPC
5165:        if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && StockAvailable::dependsOnStock($this->id, Context::getContext()->shop->id)) {
5166:            Db::getInstance()->update(
5167:                'stock',
5168:                [
5169:                    'reference' => pSQL($this->reference),
5170:                    'ean13'     => pSQL($this->ean13),
5171:                    'upc'       => pSQL($this->upc),
5172:                ],
5173:                'id_product = '.(int) $this->id.' AND id_product_attribute = 0'
5174:            );
5175:        }
5176:
5177:        Hook::exec('actionProductSave', ['id_product' => (int) $this->id, 'product' => $this]);
5178:        Hook::exec('actionProductUpdate', ['id_product' => (int) $this->id, 'product' => $this]);
5179:        if ($this->getType() == static::PTYPE_VIRTUAL && $this->active && !Configuration::get('PS_VIRTUAL_PROD_FEATURE_ACTIVE')) {
5180:            Configuration::updateGlobalValue('PS_VIRTUAL_PROD_FEATURE_ACTIVE', '1');
5181:        }
5182:
5183:        return $return;
5184:    }
5185:
5186:    /**
5187:     * Set Group reduction if needed
5188:     *
8. controllers/admin/AdminProductsController.php:2492  source ProductCore->update() 
2473:                    $isAssociatedToShop = false;
2474:                    $combinations = Product::getProductAttributesIds($object->id);
2475:                    if ($combinations) {
2476:                        foreach ($combinations as $idCombination) {
2477:                            $combination = new Combination((int) $idCombination['id_product_attribute']);
2478:                            $defaultCombination = new Combination((int) $idCombination['id_product_attribute'], null, (int) $this->object->id_shop_default);
2479:
2480:                            $def = ObjectModel::getDefinition($defaultCombination);
2481:                            foreach ($def['fields'] as $fieldName => $row) {
2482:                                $combination->$fieldName = ObjectModel::formatValue($defaultCombination->$fieldName, $def['fields'][$fieldName]['type']);
2483:                            }
2484:
2485:                            $combination->save();
2486:                        }
2487:                    }
2488:                } else {
2489:                    $isAssociatedToShop = true;
2490:                }
2491:
2492:                if ($object->update()) {
2493:                    // If the product doesn't exist in the current shop but exists in another shop
2494:                    if (Shop::getContext() == Shop::CONTEXT_SHOP && !$existingProduct->isAssociatedToShop($this->context->shop->id)) {
2495:                        $outOfStock = StockAvailable::outOfStock($existingProduct->id, $existingProduct->id_shop_default);
2496:                        $dependsOnStock = StockAvailable::dependsOnStock($existingProduct->id, $existingProduct->id_shop_default);
2497:                        StockAvailable::setProductOutOfStock((int) $this->object->id, $outOfStock, $this->context->shop->id);
2498:                        StockAvailable::setProductDependsOnStock((int) $this->object->id, $dependsOnStock, $this->context->shop->id);
2499:                    }
2500:
2501:                    Logger::addLog(sprintf($this->l('%s modification', 'AdminTab', false, false), $this->className), 1, null, $this->className, (int) $this->object->id, true, (int) $this->context->employee->id);
2502:                    if (in_array($this->context->shop->getContext(), [Shop::CONTEXT_SHOP, Shop::CONTEXT_ALL])) {
9. override/controllers/admin/AdminProductsController.php:46  source AdminProductsControllerCore->processUpdate() 
27:{
28:    /*
29:    * module: amazzingfilter
30:    * date: 2020-05-22 11:20:24
31:    * version: 3.0.3
32:    */
33:    public function processAdd()
34:    {
35:        $ret = parent::processAdd();
36:        Hook::exec('actionIndexProduct', array('product' => $this->object->id));
37:        return $ret;
38:    }
39:    /*
40:    * module: amazzingfilter
41:    * date: 2020-05-22 11:20:24
42:    * version: 3.0.3
43:    */
44:    public function processUpdate()
45:    {
46:        $ret = parent::processUpdate();
47:        Hook::exec('actionIndexProduct', array('product' => $this->object->id));
48:        return $ret;
49:    }
50:}
10. classes/controller/AdminController.php:1275  source AdminProductsController->processUpdate() 
1256:
1257:        return $object;
1258:    }
1259:
1260:    /**
1261:     * Call the right method for creating or updating object
1262:     *
1263:     * @return bool
1264:     *
1265:     * @since   1.0.0
1266:     * @version 1.0.0 Initial version
1267:     * @throws PrestaShopException
1268:     * @throws PrestaShopException
1269:     */
1270:    public function processSave()
1271:    {
1272:        if ($this->id_object) {
1273:            $this->object = $this->loadObject();
1274:
1275:            return $this->processUpdate();
1276:        } else {
1277:            return $this->processAdd();
1278:        }
1279:    }
1280:
1281:    /**
1282:     * Object update
1283:     *
1284:     * @return ObjectModel|false
1285:     * @throws PrestaShopException
11. classes/controller/AdminController.php:606  source AdminControllerCore->processSave() 
587:                // Process list filtering
588:                if ($this->filter && $this->action != 'reset_filters') {
589:                    $this->processFilter();
590:                }
591:
592:                if (isset($_POST) && count($_POST) && (int) Tools::getValue('submitFilter'.$this->list_id) || Tools::isSubmit('submitReset'.$this->list_id)) {
593:                    $this->setRedirectAfter(static::$currentIndex.'&token='.$this->token.(Tools::isSubmit('submitFilter'.$this->list_id) ? '&submitFilter'.$this->list_id.'='.(int) Tools::getValue('submitFilter'.$this->list_id) : '').(isset($_GET['id_'.$this->list_id]) ? '&id_'.$this->list_id.'='.(int) $_GET['id_'.$this->list_id] : ''));
594:
595:                    if (!empty(Tools::getValue('id_'.$this->list_id.'_category'))) {
596:                        $this->setRedirectAfter($this->redirect_after.'&id_'.$this->list_id.'_category='.Tools::getValue('id_'.$this->list_id.'_category'));
597:                    }
598:                }
599:
600:                // If the method named after the action exists, call "before" hooks, then call action method, then call "after" hooks
601:                if (!empty($this->action) && method_exists($this, 'process'.ucfirst(Tools::toCamelCase($this->action)))) {
602:                    // Hook before action
603:                    Hook::exec('actionAdmin'.ucfirst($this->action).'Before', ['controller' => $this]);
604:                    Hook::exec('action'.get_class($this).ucfirst($this->action).'Before', ['controller' => $this]);
605:                    // Call process
606:                    $return = $this->{'process'.Tools::toCamelCase($this->action)}();
607:                    // Hook After Action
608:                    Hook::exec('actionAdmin'.ucfirst($this->action).'After', ['controller' => $this, 'return' => $return]);
609:                    Hook::exec('action'.get_class($this).ucfirst($this->action).'After', ['controller' => $this, 'return' => $return]);
610:
611:                    return $return;
612:                }
613:            }
614:        } catch (PrestaShopException $e) {
615:            $this->errors[] = $e->getMessage();
616:        };
12. controllers/admin/AdminProductsController.php:1302  source AdminControllerCore->postProcess() 
1283:        }
1284:
1285:        if (is_array($this->submitted_tabs) && in_array($tabName, $this->submitted_tabs)) {
1286:            return true;
1287:        }
1288:
1289:        return false;
1290:    }
1291:
1292:    /**
1293:     * postProcess handle every checks before saving products information
1294:     *
1295:     * @return void
1296:     *
1297:     * @since 1.0.0
1298:     */
1299:    public function postProcess()
1300:    {
1301:        if (!$this->redirect_after) {
1302:            parent::postProcess();
1303:        }
1304:
1305:        if ($this->display == 'edit' || $this->display == 'add') {
1306:            $this->addJqueryUI(
1307:                [
1308:                    'ui.core',
1309:                    'ui.widget',
1310:                ]
1311:            );
1312:
13. classes/controller/Controller.php:197  source AdminProductsControllerCore->postProcess() 
178:        } else {
179:            $this->$property = $value;
180:        }
181:    }
182:
183:    /**
184:     * Starts the controller process
185:     *
186:     * @since   1.0.0
187:     * @version 1.0.0 Initial version
188:     */
189:    public function run()
190:    {
191:        $this->init();
192:        if ($this->checkAccess()) {
193:            if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
194:                $this->setMedia();
195:            }
196:
197:            $this->postProcess();
198:
199:            if (!empty($this->redirect_after)) {
200:                $this->redirect();
201:            }
202:
203:            if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
204:                $this->initHeader();
205:            }
206:
207:            if ($this->viewAccess()) {
14. classes/Dispatcher.php:852  source ControllerCore->run() 
833:                    return;
834:                }
835:                break;
836:
837:            default:
838:                throw new PrestaShopException('Bad front controller chosen');
839:        }
840:
841:        // Instantiate controller
842:        try {
843:            // Loading controller
844:            $controller = Controller::getController($controllerClass);
845:
846:            // Execute hook dispatcher
847:            if (isset($paramsHookActionDispatcher)) {
848:                Hook::exec('actionDispatcher', $paramsHookActionDispatcher);
849:            }
850:
851:            // Running controller
852:            $controller->run();
853:        } catch (PrestaShopException $e) {
854:            $e->displayMessage();
855:        }
856:    }
857:
858:    /**
859:     * Retrieve the controller from url or request uri if routes are activated
860:     *
861:     * @param int|null $idShop
862:     *
15. override/classes/Dispatcher.php:39  source DispatcherCore->dispatch() 
20: *  International Registered Trademark & Property of ETS-Soft
21: */
22:class Dispatcher extends DispatcherCore
23:{
24:    /*
25:    * module: ets_superspeed
26:    * date: 2021-02-28 16:53:39
27:    * version: 1.2.4
28:    */
29:    public function dispatch() {
30:        if(@file_exists(dirname(__FILE__).'/../../modules/ets_superspeed/ets_superspeed.php'))
31:        {
32:            require_once(dirname(__FILE__).'/../../modules/ets_superspeed/ets_superspeed.php');
33:            if($cache = Ets_superspeed::displayContentCache(true))
34:            {
35:                echo $cache;
36:                exit;
37:            }
38:        }
39:        parent::dispatch();
40:    }
41:}
16. smtgitb9e0nbr7r0/index.php:69  source Dispatcher->dispatch() 
50:
51:// For retrocompatibility with "tab" parameter
52:if ( ! (isset($_GET['controller']) && $_GET['controller'])
53:    && (isset($_GET['tab']) && $_GET['tab'])
54:) {
55:    $_GET['controller'] = strtolower($_GET['tab']);
56:}
57:if ( ! (isset($_POST['controller']) && $_POST['controller'])
58:    && (isset($_POST['tab']) && $_POST['tab'])
59:) {
60:    $_POST['controller'] = strtolower($_POST['tab']);
61:}
62:if ( ! (isset($_REQUEST['controller']) && $_REQUEST['controller'])
63:    && (isset($_REQUEST['tab']) && $_REQUEST['tab'])
64:) {
65:    $_REQUEST['controller'] = strtolower($_REQUEST['tab']);
66:}
67:
68:// Prepare and trigger admin dispatcher
69:Dispatcher::getInstance()->dispatch();
Edited by movieseals
Typos corrections

8 answers to this question

Recommended Posts

  • 0
Posted

Short analysis:

 - It looks like it comes from the module ets_superspeed. Try removing it from below the /modules directory and then clear the cache.

 - A call to a function mysql_error() looks really weird. The standard has become mysqli_error() years ago.

 

  • 0
Posted

 

2 minutes ago, musicmaster said:

Short analysis:

 - It looks like it comes from the module ets_superspeed. Try removing it from below the /modules directory and then clear the cache.

 - A call to a function mysql_error() looks really weird. The standard has become mysqli_error() years ago.

 

musicmaster:

I definitely cleared the cache after disabling all the modules listed in the string.  I also disabled all overrides.  Eventually went as far as only using the TB modules.  As for the function mysql_error(), I could not tell you.  I am using the latest versions of all the modules, and they all seem to have been updated in the last year or so.

UPDATE:

OK.  After several hours, we finally figured it out.  I believe that error messages should be a little more explicit than this: An error occurred while updating an object. product ()

I mean, yes, there is a problem with saving the object, and yes, from the exception log, we can tell it is database related...  But the database is vast.  The problem could be anywhere.  And in my experience, not necessarily directly related!

Except, in this case, it was.  Somehow, after turning debug mode on, I finally got a useful answer while trying to save a product tag.  It told me that a function did not exist in the database.  With that, I was finally able to get a mysql error code while attempting the same save in phpmyadmin.  Investigating, we found that there was an extra space in a TRIM function in one of the triggers in the DB, which caused the error.  Fixing it solved all the issues.

However, I do not understand why the error being sent to us is so generic in the first place.  Why do we not get the much clearer and on point errors from debug mode, since it can obviously pinpoint it much better?  I could have fixed my issue in an hour instead of agonizing over it for nearly 2 days...

Merchants are not devs - we do need to develop some dev skills, wether we like it or not, but less generic error messages would help us tremendously, since we are working mostly from experience and cobbled together knowledge from the internet!!!

It reminded me of a problem I had with carriers at some point a year or two ago, where the error message made no sense at all, and it forced me to look at things that were unrelated for days on end until a dev explained that it was an error message chosen at random from a list of error messages and that it had no relevance at all to the issue I was experiencing!!!  At this point, why bother with an error message at all???

All this to say that error reporting should be improved, as often the error messages have no bearing on what is really happening - not talking about the exception log here, but the Core error messages.  If a more correct answer is able to be generated in debug mode, why can't we extract it from there directly?  It would save so much time!  And help those uncomfortable with debug mode or unfamilliar with it.  I mean, sometimes, the screen fills with errors and it can be scary for the uninitiated.  But if we could get a clearer, more specific error message, it would help everyone, from the DIY merchant to the devs themselves!

Just a thought.

  • Like 1
  • 0
Posted

On closer look I saw that it is the module psseobooster that contains a call to mysql_error().

What happened was that there was some kind of error in this module. This module had proper error handling but it used this outdated function for it. And so you saw only the error that this outdated function didn't exist instead of the real problem that this function should have displayed. 

I don't see what Thirty Bees could have done to help you in this case.

  • 0
Posted
4 minutes ago, musicmaster said:

I don't see what Thirty Bees could have done to help you in this case.

I still got an error with the modules removed and disabled. TB would still not save and only said: An error occurred while updating an object. product ()

The debug mode knew what the error was, but it was buried deep because it is mostly a dev tool - had I gotten that error right off the bat, I would have not wasted so much time trying to find what was causing the issue.  So, my point is, if debug mode knows the error, why is that not fed to us instead of these generic, useless error messages?

That's all - it is a suggestion that would help a lot of people like me.

  • 0
Posted

Debug mode is only recommended if you you are not on a live shop. Otherwise your shop could break easily, if one module has a little issue on one place. So the game always works like this:

  1. Oh there is a fucking problem.
  2. Switch debug on -> does it say something?
  3. Fix the bug
  4. Switch debug mode to off again.

Your issue seems very issue to explain: https://www.php.net/manual/de/function.mysql-error.php. I would bet almost all my money, that you switched to PHP 7.x recently. The function used by this module, is no more available in PHP 7. If you want to fix, you would need to remove this function (ideally replace it with something newer). But even more cleanly would be, to understand, why it actually want to throw an error. Because this shouldn't be happen anyway...

  • 0
Posted
On 8/23/2021 at 8:22 AM, movieseals said:

I cannot reach my developper but this odd problem started out of the blue yesterday, with no specific actions on our part.  We are now unable to save any products.  

And its solved? The developer got back at you?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...