Jump to content
Sign in to follow this  
keat

Failed to update product

Recommended Posts

When trying to edit a product, I'm seeing the following error.

[541] SELECT * FROM `CubeCart_option_assign` WHERE CubeCart_option_assign.product = '674' ; -- (0.00075101852416992 sec) [NOT CACHED]
[542] INSERT INTO `CubeCart_system_error_log` (`message`,`time`) VALUES ('[Notice] /home/xxxxx/public_html/admin_xxxxxx/sources/products.index.inc.php:841 - Undefined variable: option_list','1562158917'); -- (0.24456095695496 sec) [ERROR - NOT CACHED]
[543] DELETE FROM `CubeCart_system_error_log` WHERE time < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 DAY)) ; -- (0.00028681755065918 sec) [ERROR - NOT CACHED]

 

and a few lines later.

 

[555] SELECT * FROM `CubeCart_option_matrix` WHERE CubeCart_option_matrix.product_id = '674' ; -- (0.00016021728515625 sec) [NOT CACHED]
[556] INSERT INTO `CubeCart_system_error_log` (`message`,`time`) VALUES ('[Notice] /home/xxxxx/public_html/admin_xxxxx/sources/products.index.inc.php:1113 - Undefined index: option_matrix','1562158918'); -- (0.053889036178589 sec) [ERROR - NOT CACHED]
[557] DELETE FROM `CubeCart_system_error_log` WHERE time < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 DAY)) ; -- (0.00028395652770996 sec) [ERROR - NOT CACHED]

A banner appears on the admin side to say update failed, but the product does update.

There are no options or options matrix applied to these products

Any thoughts as to what's going on.

It's not every product, just the occasional one.

Share this post


Link to post
Share on other sites

Posted (edited)

When CubeCart is in debug mode, much more gets logged into the System Error database table. Specifically, PHP's Notices that state that array elements with an unknown associative key and variables that do not actually exist as yet, as well as a few other types of Warnings and Notices.

With debug mode switched off, CubeCart does not log these types of PHP utterances.

However, that these queries shown in the debug panel are red errors suggests that the database table CubeCart_system_error_log may be having some issues. In admin, Maintenance, Database tab, see if there is any "Crashed" warning banner for any table. (Maybe need to use phpMyAdmin from your hosting account's control panel.)

Please understand that, aside from any bugs, if the database engine responds to an UPDATE statement with "No records actually affected", then CubeCart mis-uses that response as the UPDATE having failed. The page banner should really say, "Update failed or no changes to update."

Edited by bsmither

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...