Incorrect data in the VM tables in some cases

Started by lysov, June 29, 2012, 09:52:07 AM

Previous topic - Next topic

lysov

For some reason some new products have empty values of the `created_on` ('0000-00-00 00:00:00') and `created_by` (0). Such products has also wrong values of the default settings (g.e. `product_weight_uom` and `product_lwh_uom`).
Here is part of the sql-dump, the product with id=14101 has incorrect values of the `product_weight_uom`, `product_lwh_uom`, `created_by` and `created_on`:
INSERT INTO `#__virtuemart_products` VALUES
/* virtuemart_product_id, virtuemart_vendor_id, product_parent_id, product_sku, product_weight, product_weight_uom, product_length, product_width, product_height, product_lwh_uom, product_url, product_in_stock, product_ordered, low_stock_notification, product_available_date, product_availability, product_special, product_sales, product_unit, product_packaging, product_params, hits, intnotes, metarobot, metaauthor, layout, published, created_on , created_by, modified_on, modified_by, locked_on, locked_by */
...
(14100,1,0,'978-5-407-00268-0',0.0000,'GR',0.0000,0.0000,0.0000,'MM','',0,0,0,'2012-05-05 00:00:00','',0,0,'',0,'min_order_level=\"0\"|max_order_level=\"0\"|',NULL,'','','','book-portrait',1,'2012-05-05 06:37:01',50,'2012-06-20 11:30:11',50,'0000-00-00 00:00:00',0),

(14101,1,0,'978-5-407-00255-0',0.0000,'KG',0.0000,0.0000,0.0000,'M','',0,0,0,'0000-00-00 00:00:00','',0,0,'',0,'min_order_level=\"0\"|max_order_level=\"0\"|',NULL,'','','','book-portrait',1,'0000-00-00 00:00:00',0,'2012-05-14 10:22:54',53,'0000-00-00 00:00:00',0),

(14102,1,0,'978-5-407-00256-7',0.0000,'GR',0.0000,0.0000,0.0000,'MM','',0,0,0,'2012-05-05 00:00:00','',0,0,'',0,'min_order_level=\"0\"|max_order_level=\"0\"|',NULL,'\r\n \r\n \r\n ','','','0',1,'2012-05-05 09:37:21',53,'2012-05-05 10:28:52',53,'0000-00-00 00:00:00',0),

...


This error (`created_on`='0000-00-00 00:00:00', `created_by`=0) can also be seen in other tables: `#__virtuemart_categories`, `#__virtuemart_manufacturers`, `#__virtuemart_medias`, `#__virtuemart_vmusers`


MySQL   5.5.24
PHP   5.3.13
J!   2.5.6
VM   203c-207f

lysov

vm 208e
MySql 5.5.25a
Codepage utf8_general_ci
PHP 5.3.14,  Apache/2.2.22

After adding a few products the table  `#__virtuemart_products` has correct values ​​of the fields (`created_on`, etc), but the table `#__virtuemart_medias`contains incorrect values of the following fields:
`file_is_product_image` = 0
`created_on` = 0000-00-00 00:00:00
`created_by` = 0

Milbo

I think this is the sample data. then there is already data in it and not overwritten, need to add a check that a zero date is also overwritten.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lysov

Unfortunately this is not the sample data, it is the result of adding the real products on the real site. Too bad that was not always this bug. Because I do not add products, I can not say what actions of the editors lead this result.