Author Topic: Restore system default  (Read 2201 times)

Elnino

  • Beginner
  • *
  • Posts: 47
    • Calgary Web Designer
Restore system default
« on: October 27, 2011, 00:17:21 am »
Hi,

I just upgraded from RC2H to RC2J.

I still have an error on the front-end: Couldnt create thumb, file not found /homez.425/bolstibe/www/images/stories/virtuemart/product/images/stories/virtuemart/category/1b0c96d67abdbea648cd0ea96fd6abcb.jpg
Thus I clicked on "Restore System Default" in tools tab.

Then I got this error message:

Code: [Select]
JInstaller::install: /homez.425/bolstibe/www/administrator/components/com_virtuemart/install/install_required_data.sql SQL Error DB function failed with error number 1062
Duplicate entry '1' for key 'virtuemart_custom_id' SQL=-- -- Dumping data for table `jos__virtuemart_customs` -- INSERT INTO `jos_virtuemart_customs` ( `virtuemart_custom_id`, `custom_parent_id`, `admin_only`, `custom_title`, `custom_tip`, `custom_value`, `custom_field_desc`, `field_type`, `is_list`, `is_hidden`, `is_cart_attribute`, `published`, `created_on`, `created_by`, `modified_on`, `modified_by`, `locked_on`, `locked_by`) VALUES (1,0, 0, 'COM_VIRTUEMART_RELATED_PRODUCTS', 'COM_VIRTUEMART_RELATED_PRODUCTS_TIP', '', 'COM_VIRTUEMART_RELATED_PRODUCTS_DESC', 'R', 0, 0, 0, 1, '2011-05-25 21:52:43', 62, '2011-05-25 21:52:43', 62, '0000-00-00 00:00:00', 0), (2,0, 0, 'COM_VIRTUEMART_RELATED_CATEGORIES', 'COM_VIRTUEMART_RELATED_CATEGORIES_TIP', NULL, 'COM_VIRTUEMART_RELATED_CATEGORIES_DESC', 'Z', 0, 0, 0, 1, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0);
SQL =

--
-- Dumping data for table `#___virtuemart_customs`
--

INSERT INTO `#__virtuemart_customs` ( `virtuemart_custom_id`, `custom_parent_id`, `admin_only`, `custom_title`, `custom_tip`, `custom_value`, `custom_field_desc`, `field_type`, `is_list`, `is_hidden`, `is_cart_attribute`, `published`, `created_on`, `created_by`, `modified_on`, `modified_by`, `locked_on`, `locked_by`) VALUES
(1,0, 0, 'COM_VIRTUEMART_RELATED_PRODUCTS', 'COM_VIRTUEMART_RELATED_PRODUCTS_TIP', '', 'COM_VIRTUEMART_RELATED_PRODUCTS_DESC', 'R', 0, 0, 0, 1, '2011-05-25 21:52:43', 62, '2011-05-25 21:52:43', 62, '0000-00-00 00:00:00', 0),
(2,0, 0, 'COM_VIRTUEMART_RELATED_CATEGORIES', 'COM_VIRTUEMART_RELATED_CATEGORIES_TIP', NULL, 'COM_VIRTUEMART_RELATED_CATEGORIES_DESC', 'Z', 0, 0, 0, 1, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0);

Thanks

Elnino

  • Beginner
  • *
  • Posts: 47
    • Calgary Web Designer
Re: Restore system default
« Reply #1 on: October 27, 2011, 00:18:12 am »
The error regarding thumb disappeared on the front-end though ...

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Restore system default
« Reply #2 on: October 27, 2011, 10:27:55 am »
Thanks for finding this small bug. Hmmm I must admit I think about to solve the bug just with removing the option.

The whole command restore system default should do almost the same as "Reset all tables and do a fresh install". But it should not delete the user generated data, like products, categories, manufacturers.

But what is when someone created his own currencies? or his own districts (states). The error above could be easily fixed with deleting also the customfields. On the other hand, products could get destroyed, when you delete them. So they are user generated data or not? countries, states, currencies, customfields, ....

So maybe it is just better to remove this option. When people want to save their data, they should export it first.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/