Jump to content

Admin panel no longer updates various fields


Mattholmes

Recommended Posts

Hello again, i'm having a strange issue with the admin panel on my website since updating to the latest Cubecart V6 from an older V5 website.

Since updating, various pages in the admin panel will no longer submit changes permanently. The issues we have come across so far are:

  • When manually adding an order through the admin panel and clicking "Save" or "Save and reload", the added order will not save the VAT value but will still add the value to the total of the order.
  • When manually adding an order and again saving the order, the order will occasionally lose one of our line items but again preserve the correct order value.
  • When attempting to assign categories when updating a product, the newly assigned categories will not be saved.

So far I have tried reinstalling the admin files and resetting as much to default settings as possible, but the issue persists. We have also moved to a new hosting package and migrated the databases onto the new host, but again I can't see anything obvious that may have gone awry there.

Thank you for reading, I will be happy to offer any more information if it is required.

 

Edit: Further to this, please see the following errors which I hope may shed more light on the issue

Today, 12:05	File: [products.index.inc.php] Line: [350] "INSERT INTO `cc_CubeCart_category_index` (`product_id`,`cat_id`,`primary`) VALUES ('181','18','1');" - Duplicate entry '0' for key 'PRIMARY'
	Today, 12:05	File: [products.index.inc.php] Line: [350] "INSERT INTO `cc_CubeCart_category_index` (`product_id`,`cat_id`,`primary`) VALUES ('181','23','0');" - Duplicate entry '0' for key 'PRIMARY'
	Today, 12:05	File: [acp.class.php] Line: [171] "INSERT INTO `cc_CubeCart_admin_log` (`admin_id`,`ip_address`,`time`,`description`) VALUES ('1','removed by me, IP address','1599480302','Product successfully updated.');" - Duplicate entry '0' for key 'PRIMARY'

The above are the issues when attempting to change a products category association, I have removed the IP address in the third line

--------------------------------------------

File: [acp.class.php] Line: [171] "INSERT INTO `cc_CubeCart_admin_log` (`admin_id`,`ip_address`,`time`,`description`) VALUES ('1','IP address, removed by me','1599481972','Order successfully created.');" - Duplicate entry '0' for key 'PRIMARY'

The above error is generated when creating a new order manually through the admin panel

--------------------------------------------

File: [catalogue.class.php] Line: [1904] "SELECT I.*, MATCH () AGAINST('ASHFORD' IN BOOLEAN MODE) AS Relevance FROM cc_CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM cc_CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `cc_CubeCart_category_index` as CI INNER JOIN cc_CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (MATCH () AGAINST('ASHFORD' IN BOOLEAN MODE)) >= 0.5 AND `live_from` < UNIX_TIMESTAMP() ORDER BY `Relevance` DESC LIMIT 10 OFFSET 0 " - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AGAINST('ASHFORD' IN BOOLEAN MODE) AS Relevance FROM cc_CubeCart_inventory AS ' at line 1

This is a separate error I have just come across that seems to reference a MySQL syntax error?

 

Once again, thank you for your time

Link to comment
Share on other sites

As a follow up, I have fixed the error relating to the categories not being updated by correcting some SQL issues. This was resolved by changing the erroneous PRIMARY attribute in the database to be a non-unique index and the categories are being updated correctly. I will leave this here for reference in case it helps someone in the future.

I have checked through the database structure for other incorrect values and I am still having the issues with the tax not correctly being added. Attached is an image showing how the tax is being displayed in the order.

Thanks,

Matt

cubecart.png

Link to comment
Share on other sites

Final update as I have solved the issues I was having. Basically, when migrating the SQL tables a number of tables did not preserve their indexes correctly and lost their auto_increment values, resulting in a lot of new data that has been added since migration having the ID as 0. I manually repaired the ID values in the effected tables and corrected all the table structures to correctly auto_increment the correct columns and everything seems to have returned to normal.

Lesson learned - Don't let people rush you when you're working, or you'll make stupid and very avoidable mistakes.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...