{"action":"created","issue":{"url":"https://api.github.com/repos/symphonists/order_entries/issues/73","repository_url":"https://api.github.com/repos/symphonists/order_entries","labels_url":"https://api.github.com/repos/symphonists/order_entries/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/symphonists/order_entries/issues/73/comments","events_url":"https://api.github.com/repos/symphonists/order_entries/issues/73/events","html_url":"https://github.com/symphonists/order_entries/issues/73","id":109978139,"number":73,"title":"Save Section throws error when removing field selection from \"Filtered Ordering\"","user":{"login":"twiro","id":870227,"avatar_url":"https://avatars.githubusercontent.com/u/870227?v=3","gravatar_id":"","url":"https://api.github.com/users/twiro","html_url":"https://github.com/twiro","followers_url":"https://api.github.com/users/twiro/followers","following_url":"https://api.github.com/users/twiro/following{/other_user}","gists_url":"https://api.github.com/users/twiro/gists{/gist_id}","starred_url":"https://api.github.com/users/twiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twiro/subscriptions","organizations_url":"https://api.github.com/users/twiro/orgs","repos_url":"https://api.github.com/users/twiro/repos","events_url":"https://api.github.com/users/twiro/events{/privacy}","received_events_url":"https://api.github.com/users/twiro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-06T10:19:26Z","updated_at":"2016-02-15T14:46:18Z","closed_at":"2015-10-07T21:50:44Z","body":"@jonmifsud - I was just trying out the new \"filtered ordering\"-feature in a new project (latest integration-branch in S2.6.3) and got the following error when trying to remove a previously saved field from the new \"filtered ordering\"-setting:\r\n\r\n    Symphony Fatal Database Error: Duplicate entry '11' for key 'unique'\r\n    An error occurred while attempting to execute the following query\r\n    ALTER TABLE `sym_entries_data_30` DROP COLUMN `field_23`\r\n\r\nApart from the error-message, everything looks ok. The Selection has been removed after reloading the page."},"comment":{"url":"https://api.github.com/repos/symphonists/order_entries/issues/comments/184235887","html_url":"https://github.com/symphonists/order_entries/issues/73#issuecomment-184235887","issue_url":"https://api.github.com/repos/symphonists/order_entries/issues/73","id":184235887,"user":{"login":"animaux","id":446874,"avatar_url":"https://avatars.githubusercontent.com/u/446874?v=3","gravatar_id":"","url":"https://api.github.com/users/animaux","html_url":"https://github.com/animaux","followers_url":"https://api.github.com/users/animaux/followers","following_url":"https://api.github.com/users/animaux/following{/other_user}","gists_url":"https://api.github.com/users/animaux/gists{/gist_id}","starred_url":"https://api.github.com/users/animaux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/animaux/subscriptions","organizations_url":"https://api.github.com/users/animaux/orgs","repos_url":"https://api.github.com/users/animaux/repos","events_url":"https://api.github.com/users/animaux/events{/privacy}","received_events_url":"https://api.github.com/users/animaux/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T14:46:18Z","updated_at":"2016-02-15T14:46:18Z","body":"Reopening since I still get an error trying to deselect a field for filtering and saving the section:\r\n\r\n### Symphony Fatal Database Error: Duplicate entry '256' for key 'unique'\r\n\r\nAn error occurred while attempting to execute the following query\r\n\r\n    ALTER TABLE `sym_entries_data_48` DROP COLUMN `field_47`\r\n\r\n### Backtrace\r\n\r\n    [/…/symphony/lib/toolkit/class.mysql.php:554]\r\n        MySQL->__error();\r\n    [/…/extensions/order_entries/fields/field.order_entries.php:226]\r\n        MySQL->query();\r\n    [/…/extensions/order_entries/fields/field.order_entries.php:280]\r\n        fieldOrder_Entries->updateFilterTable();\r\n    [/…/symphony/content/content.blueprintssections.php:788]\r\n        fieldOrder_Entries->commit();\r\n    [/…/symphony/content/content.blueprintssections.php:883]\r\n        contentBlueprintsSections->__actionNew();\r\n    [/…/symphony/lib/toolkit/class.administrationpage.php:706]\r\n        contentBlueprintsSections->__actionEdit();\r\n    [/…/symphony/lib/toolkit/class.administrationpage.php:669]\r\n        AdministrationPage->__switchboard();\r\n    [/…/symphony/lib/toolkit/class.administrationpage.php:449]\r\n        AdministrationPage->action();\r\n    [/…/symphony/content/content.blueprintssections.php:26]\r\n        AdministrationPage->build();\r\n    [/…/symphony/lib/core/class.administration.php:212]\r\n        contentBlueprintsSections->build();\r\n    [/…/symphony/lib/core/class.administration.php:490]\r\n        Administration->__buildPage();\r\n    [/…/symphony/lib/boot/func.utilities.php:231]\r\n        Administration->display();\r\n    [/…/symphony/lib/boot/func.utilities.php:213]\r\n        symphony_launcher();\r\n    [/…/index.php:17]\r\n        symphony();\r\n\r\n### Database Query Log\r\n\r\n    [0.0001] SET character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8';\r\n    [0.0001] SET CHARACTER SET 'utf8';\r\n    [0.0001] SET time_zone = '+01:00';\r\n    [0.0002] SELECT SQL_CACHE t1.name, t2.page, t2.delegate, t2.callback FROM `sym_extensions` as t1 INNER JOIN `sym_extensions_delegates` as t2 ON t1.id = t2.extension_id WHERE t1.status = 'enabled' ORDER BY t2.delegate, t1.name;\r\n    [0.0001] SELECT SQL_CACHE `name` FROM `sym_extensions` WHERE `status` = 'enabled';\r\n    [0.0001] SELECT SQL_CACHE `session_data` FROM `sym_sessions` WHERE `session` = 'aa439f8a8c5c34a03ffd3be3e218419e' LIMIT 1;\r\n    [0.0001] SELECT SQL_CACHE a.* FROM `sym_authors` AS `a` WHERE `username` = 'goldwiege' ORDER BY a.id ASC LIMIT 1;\r\n    [0.0002] UPDATE sym_authors SET `last_seen` = '2016-02-15 15:44:05' WHERE `id` = 1;\r\n    [0.0001] SELECT SQL_CACHE * FROM `sym_extensions`;\r\n    [0.0003] SELECT SQL_CACHE * FROM `sym_sections_association` AS `sa`, `sym_sections` AS `s` WHERE `sa`.`child_section_id` = 6 AND `s`.`id` = `sa`.`parent_section_id` ORDER BY `s`.`sortorder` ASC;\r\n    [0.0002] SELECT SQL_CACHE * FROM `sym_sections_association` AS `sa`, `sym_sections` AS `s` WHERE `sa`.`parent_section_id` = 6 AND `s`.`id` = `sa`.`child_section_id` ORDER BY `s`.`sortorder` ASC;\r\n    [0.0001] SELECT SQL_CACHE `s`.* FROM `sym_sections` AS `s` ORDER BY `s`.`sortorder` asc;\r\n    [0.0001] SELECT SQL_CACHE d.pages, d.id FROM `sym_documentation` AS d ORDER BY d.pages ASC;\r\n    [0.0000] SELECT SQL_CACHE `id` FROM `sym_sections` WHERE `handle` = 'artikel' LIMIT 1;\r\n    [0.0001] UPDATE sym_sections SET `name` = 'Artikel', `handle` = 'artikel', `navigation_group` = 'Inhalte', `hidden` = 'no', `filter` = 'yes', `max_entries` = '0' WHERE `id` = 6;\r\n    [0.0000] SELECT SQL_CACHE `id` FROM `sym_fields` WHERE `parent_section` = '6' AND `id` NOT IN ('38', '39', '49', '46', '47', '66', '44', '45', '110', '41', '42', '50', '48');\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Deutsch', `element_name` = 'de', `parent_section` = '6', `location` = 'main', `required` = 'no', `type` = 'publish_tabs', `show_column` = 'no', `sortorder` = '0' WHERE `id` = 38;\r\n    [0.0000] SELECT SQL_CACHE `type` FROM `sym_fields` WHERE `id` = 38 LIMIT 1;\r\n    [0.0001] DELETE FROM `sym_fields_publish_tabs` WHERE `field_id` = 38 LIMIT 1;\r\n    [0.0001] INSERT INTO `sym_fields_publish_tabs` (`field_id`) VALUES ('38');\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Titel (de)', `element_name` = 'titel-de', `parent_section` = '6', `location` = 'main', `required` = 'yes', `type` = 'input', `show_column` = 'yes', `sortorder` = '1' WHERE `id` = 39;\r\n    [0.0000] SELECT SQL_CACHE `type` FROM `sym_fields` WHERE `id` = 39 LIMIT 1;\r\n    [0.0001] DELETE FROM `sym_fields_input` WHERE `field_id` = 39 LIMIT 1;\r\n    [0.0001] INSERT INTO `sym_fields_input` (`validator`, `field_id`) VALUES (null, '39');\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Text (de)', `element_name` = 'text-de', `parent_section` = '6', `location` = 'main', `required` = 'yes', `type` = 'textarea', `show_column` = 'no', `sortorder` = '2' WHERE `id` = 49;\r\n    [0.0000] SELECT SQL_CACHE `type` FROM `sym_fields` WHERE `id` = 49 LIMIT 1;\r\n    [0.0001] DELETE FROM `sym_fields_textarea` WHERE `field_id` = 49 LIMIT 1;\r\n    [0.0001] INSERT INTO `sym_fields_textarea` (`formatter`, `size`, `field_id`) VALUES ('markdown_extra_with_smartypants', '15', '49');\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Veröffentlicht', `element_name` = 'veroeffentlicht', `parent_section` = '6', `location` = 'sidebar', `required` = 'no', `type` = 'checkbox', `show_column` = 'yes', `sortorder` = '3' WHERE `id` = 46;\r\n    [0.0000] SELECT SQL_CACHE `type` FROM `sym_fields` WHERE `id` = 46 LIMIT 1;\r\n    [0.0001] DELETE FROM `sym_fields_checkbox` WHERE `field_id` = 46 LIMIT 1;\r\n    [0.0001] INSERT INTO `sym_fields_checkbox` (`default_state`, `field_id`) VALUES ('on', '46');\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Navigationspunkt', `element_name` = 'nav', `parent_section` = '6', `location` = 'sidebar', `required` = 'yes', `type` = 'select', `show_column` = 'yes', `sortorder` = '4' WHERE `id` = 47;\r\n    [0.0000] SELECT SQL_CACHE `type` FROM `sym_fields` WHERE `id` = 47 LIMIT 1;\r\n    [0.0001] DELETE FROM `sym_fields_select` WHERE `field_id` = 47 LIMIT 1;\r\n    [0.0001] INSERT INTO `sym_fields_select` (`dynamic_options`, `allow_multiple_selection`, `sort_options`, `field_id`) VALUES ('35', 'no', 'no', '47');\r\n    [0.0001] DELETE FROM sym_sections_association WHERE `child_section_field_id` = 47 OR `parent_section_field_id` = 47;\r\n    [0.0000] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(35);\r\n    [0.0001] SELECT SQL_CACHE * FROM `sym_fields_input` WHERE `field_id` IN (35);\r\n    [0.0000] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(47);\r\n    [0.0001] SELECT SQL_CACHE * FROM `sym_fields_select` WHERE `field_id` IN (47);\r\n    [0.0001] SELECT SQL_CACHE CASE hide_association WHEN \"no\" THEN \"yes\" ELSE \"no\" END as show_association FROM `sym_sections_association` WHERE `child_section_field_id` = 47;\r\n    [0.0001] INSERT INTO `sym_sections_association` (`parent_section_id`, `parent_section_field_id`, `child_section_id`, `child_section_field_id`, `hide_association`, `interface`, `editor`) VALUES ('5', '35', '6', '47', 'no', null, null);\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Kopfbild', `element_name` = 'kopfbild', `parent_section` = '6', `location` = 'sidebar', `required` = 'no', `type` = 'association', `show_column` = 'no', `sortorder` = '5' WHERE `id` = 66;\r\n    [0.0000] SELECT SQL_CACHE `type` FROM `sym_fields` WHERE `id` = 66 LIMIT 1;\r\n    [0.0001] DELETE FROM `sym_fields_association` WHERE `field_id` = 66 LIMIT 1;\r\n    [0.0001] INSERT INTO `sym_fields_association` (`field_id`, `related_field_id`, `allow_multiple_selection`, `hide_when_prepopulated`, `limit`) VALUES ('66', '65', 'no', 'no', '20');\r\n    [0.0001] DELETE FROM sym_sections_association WHERE `child_section_field_id` = 66 OR `parent_section_field_id` = 66;\r\n    [0.0000] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(65);\r\n    [0.0001] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (65);\r\n    [0.0000] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(66);\r\n    [0.0001] SELECT SQL_CACHE * FROM `sym_fields_association` WHERE `field_id` IN (66);\r\n    [0.0001] SELECT SQL_CACHE CASE hide_association WHEN \"no\" THEN \"yes\" ELSE \"no\" END as show_association FROM `sym_sections_association` WHERE `child_section_field_id` = 66;\r\n    [0.0001] INSERT INTO `sym_sections_association` (`parent_section_id`, `parent_section_field_id`, `child_section_id`, `child_section_field_id`, `hide_association`, `interface`, `editor`) VALUES ('8', '65', '6', '66', 'no', 'aui-selector', 'aui-editor-new');\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Bilder', `element_name` = 'bilder', `parent_section` = '6', `location` = 'sidebar', `required` = 'no', `type` = 'association', `show_column` = 'no', `sortorder` = '6' WHERE `id` = 44;\r\n    [0.0000] SELECT SQL_CACHE `type` FROM `sym_fields` WHERE `id` = 44 LIMIT 1;\r\n    [0.0001] DELETE FROM `sym_fields_association` WHERE `field_id` = 44 LIMIT 1;\r\n    [0.0001] INSERT INTO `sym_fields_association` (`field_id`, `related_field_id`, `allow_multiple_selection`, `hide_when_prepopulated`, `limit`) VALUES ('44', '28', 'yes', 'no', '20');\r\n    [0.0001] DELETE FROM sym_sections_association WHERE `child_section_field_id` = 44 OR `parent_section_field_id` = 44;\r\n    [0.0000] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(28);\r\n    [0.0000] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (28);\r\n    [0.0000] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(44);\r\n    [0.0001] SELECT SQL_CACHE * FROM `sym_fields_association` WHERE `field_id` IN (44);\r\n    [0.0001] SELECT SQL_CACHE CASE hide_association WHEN \"no\" THEN \"yes\" ELSE \"no\" END as show_association FROM `sym_sections_association` WHERE `child_section_field_id` = 44;\r\n    [0.0001] INSERT INTO `sym_sections_association` (`parent_section_id`, `parent_section_field_id`, `child_section_id`, `child_section_field_id`, `hide_association`, `interface`, `editor`) VALUES ('3', '28', '6', '44', 'no', 'aui-selector-sortable', 'aui-editor-new');\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Downloads', `element_name` = 'downloads', `parent_section` = '6', `location` = 'sidebar', `required` = 'no', `type` = 'association', `show_column` = 'no', `sortorder` = '7' WHERE `id` = 45;\r\n    [0.0000] SELECT SQL_CACHE `type` FROM `sym_fields` WHERE `id` = 45 LIMIT 1;\r\n    [0.0001] DELETE FROM `sym_fields_association` WHERE `field_id` = 45 LIMIT 1;\r\n    [0.0001] INSERT INTO `sym_fields_association` (`field_id`, `related_field_id`, `allow_multiple_selection`, `hide_when_prepopulated`, `limit`) VALUES ('45', '33', 'yes', 'no', '20');\r\n    [0.0001] DELETE FROM sym_sections_association WHERE `child_section_field_id` = 45 OR `parent_section_field_id` = 45;\r\n    [0.0000] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(33);\r\n    [0.0000] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (33);\r\n    [0.0001] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(45);\r\n    [0.0001] SELECT SQL_CACHE * FROM `sym_fields_association` WHERE `field_id` IN (45);\r\n    [0.0001] SELECT SQL_CACHE CASE hide_association WHEN \"no\" THEN \"yes\" ELSE \"no\" END as show_association FROM `sym_sections_association` WHERE `child_section_field_id` = 45;\r\n    [0.0001] INSERT INTO `sym_sections_association` (`parent_section_id`, `parent_section_field_id`, `child_section_id`, `child_section_field_id`, `hide_association`, `interface`, `editor`) VALUES ('4', '33', '6', '45', 'no', 'aui-selector-sortable', 'aui-editor-new');\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Zitate', `element_name` = 'zitate', `parent_section` = '6', `location` = 'sidebar', `required` = 'no', `type` = 'association', `show_column` = 'no', `sortorder` = '8' WHERE `id` = 110;\r\n    [0.0000] SELECT SQL_CACHE `type` FROM `sym_fields` WHERE `id` = 110 LIMIT 1;\r\n    [0.0001] DELETE FROM `sym_fields_association` WHERE `field_id` = 110 LIMIT 1;\r\n    [0.0001] INSERT INTO `sym_fields_association` (`field_id`, `related_field_id`, `allow_multiple_selection`, `hide_when_prepopulated`, `limit`) VALUES ('110', '111', 'yes', 'no', '20');\r\n    [0.0001] DELETE FROM sym_sections_association WHERE `child_section_field_id` = 110 OR `parent_section_field_id` = 110;\r\n    [0.0000] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(111);\r\n    [0.0000] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (111);\r\n    [0.0000] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(110);\r\n    [0.0001] SELECT SQL_CACHE * FROM `sym_fields_association` WHERE `field_id` IN (110);\r\n    [0.0001] SELECT SQL_CACHE CASE hide_association WHEN \"no\" THEN \"yes\" ELSE \"no\" END as show_association FROM `sym_sections_association` WHERE `child_section_field_id` = 110;\r\n    [0.0001] INSERT INTO `sym_sections_association` (`parent_section_id`, `parent_section_field_id`, `child_section_id`, `child_section_field_id`, `hide_association`, `interface`, `editor`) VALUES ('14', '111', '6', '110', 'no', 'aui-selector-sortable', 'aui-editor-new');\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Englisch', `element_name` = 'en', `parent_section` = '6', `location` = 'main', `required` = 'no', `type` = 'publish_tabs', `show_column` = 'no', `sortorder` = '9' WHERE `id` = 41;\r\n    [0.0000] SELECT SQL_CACHE `type` FROM `sym_fields` WHERE `id` = 41 LIMIT 1;\r\n    [0.0001] DELETE FROM `sym_fields_publish_tabs` WHERE `field_id` = 41 LIMIT 1;\r\n    [0.0000] INSERT INTO `sym_fields_publish_tabs` (`field_id`) VALUES ('41');\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Titel (en)', `element_name` = 'titel-en', `parent_section` = '6', `location` = 'main', `required` = 'no', `type` = 'input', `show_column` = 'no', `sortorder` = '10' WHERE `id` = 42;\r\n    [0.0000] SELECT SQL_CACHE `type` FROM `sym_fields` WHERE `id` = 42 LIMIT 1;\r\n    [0.0001] DELETE FROM `sym_fields_input` WHERE `field_id` = 42 LIMIT 1;\r\n    [0.0001] INSERT INTO `sym_fields_input` (`validator`, `field_id`) VALUES (null, '42');\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Text (en)', `element_name` = 'text-en', `parent_section` = '6', `location` = 'main', `required` = 'no', `type` = 'textarea', `show_column` = 'no', `sortorder` = '11' WHERE `id` = 50;\r\n    [0.0000] SELECT SQL_CACHE `type` FROM `sym_fields` WHERE `id` = 50 LIMIT 1;\r\n    [0.0001] DELETE FROM `sym_fields_textarea` WHERE `field_id` = 50 LIMIT 1;\r\n    [0.0000] INSERT INTO `sym_fields_textarea` (`formatter`, `size`, `field_id`) VALUES ('markdown_extra_with_smartypants', '15', '50');\r\n    [0.0001] UPDATE sym_fields SET `label` = 'Reihenfolge', `element_name` = 'reihenfolge', `parent_section` = '6', `location` = 'sidebar', `required` = 'no', `type` = 'order_entries', `show_column` = 'yes', `sortorder` = '12' WHERE `id` = 48;\r\n    [0.0002] SHOW COLUMNS FROM sym_entries_data_48 WHERE Field like 'field_%';;"}}