Mysql : Duplicate entry in #__flexicontent_items_versions

More
12 years 11 months ago #26796 by yopyop001
Hi,

Joomla 2.5.6
FC 2.0 r1379

I have an error when i try to save an item in backend :
Code:
JDatabaseMySQLi::query: 1062 - Duplicate entry '1--2-3-1' for key 'PRIMARY' SQL=INSERT INTO `#__flexicontent_items_versions` (`field_id`,`item_id`,`valueorder`,`version`,`value`) VALUES ('-2','3','1','1','a:6:{s:5:\"alias\";s:41:\"mallette-pedagogique-les-defis-du-guarana\";s:5:\"catid\";s:1:\"9\";s:8:\"metadesc\";s:0:\"\";s:7:\"metakey\";s:0:\"\";s:8:\"metadata\";s:53:\"{\"robots\":\"\",\"author\":\"\",\"rights\":\"\",\"xreference\":\"\"}\";s:7:\"attribs\";s:235:\"{\"show_pdf_icon\":\"\",\"show_print_icon\":\"\",\"show_email_icon\":\"\",\"show_title\":\"\",\"show_intro\":\"\",\"readmore\":\"\",\"comments\":\"\",\"automatic_pathways\":\"\",\"override_title\":\"\",\"custom_ititle\":\"\",\"addcat_title\":\"\",\"add_canonical\":\"\",\"ilayout\":\"\"}\";}')
Code:
Call stack # Function Location 1 JAdministrator->dispatch() /homez.53/artisans/outils/administrator/index.php:46 2 JComponentHelper::renderComponent() /homez.53/artisans/outils/administrator/includes/application.php:153 3 JComponentHelper::executeComponent() /homez.53/artisans/outils/libraries/joomla/application/component/helper.php:351 4 require_once() /homez.53/artisans/outils/libraries/joomla/application/component/helper.php:383 5 JController->execute() /homez.53/artisans/outils/administrator/components/com_flexicontent/admin.flexicontent.php:115 6 FlexicontentControllerItems->save() /homez.53/artisans/outils/libraries/joomla/application/component/controller.php:760 7 ParentClassItem->store() /homez.53/artisans/outils/administrator/components/com_flexicontent/controllers/items.php:145 8 ParentClassItem->saveFields() /homez.53/artisans/outils/administrator/components/com_flexicontent/models/parentclassitem.php:1704 9 JDatabase->insertObject() /homez.53/artisans/outils/administrator/components/com_flexicontent/models/parentclassitem.php:1995 10 JDatabaseMySQLi->execute() /homez.53/artisans/outils/libraries/joomla/database/database.php:841 11 JError::raiseError() /homez.53/artisans/outils/libraries/joomla/database/database/mysqli.php:396 12 JError::raise() /homez.53/artisans/outils/libraries/joomla/error/error.php:251

In the #__flexicontent_items_versions table, there is a row for each item where field_id = -2

Versionning is disabled in global configuration.

When versionning is enabled, icannot edit an item, i have this message :
Code:
JDatabaseMySQLi::query: 1062 - Duplicate entry '24-3-1' for key 'PRIMARY' SQL=INSERT INTO `outilsfam_flexicontent_fields_item_relations` (`field_id`,`item_id`,`valueorder`,`value`) VALUES ('24','3','1','6:9')
I don't see what could be wrong...

Best regards

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #26798 by ggppdk
Yes i found problem, we are saving versioned data when versioning is disabled ...

it is a new feature of versioning extra item properties, that were lost (in previous version) when you save an approved version:
('alias', 'catid', 'metadesc', 'metakey', 'metadata', 'attribs')

I ll commit fix, thanks for reporting


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #26800 by ggppdk
In r1380,

# Fixed
(a) issue with versioning of item properties (new feature) when they should not (case that versioning is disabled)

(b) Adding current version process not working properly in some cases

Thanks for reporting


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #26803 by yopyop001
Nice !

Thanks a lot Georgios!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.362 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save