Search

Just updated my Symphony dev installation and get this error, only on one section in the backend...

Symphony Fatal Database Error: 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 ') ORDER BY t1.`sortorder` ASC' at line 4

An error occurred while attempting to execute the following query

SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND id IN () ORDER BY t1.`sortorder` ASC
Backtrace
[/Applications/MAMP/htdocs/ABCDEF/symphony/lib/toolkit/class.mysql.php:475]
    MySQL->__error();
[/Applications/MAMP/htdocs/ABCDEF/symphony/lib/toolkit/class.mysql.php:671]
    MySQL->query();
[/Applications/MAMP/htdocs/ABCDEF/symphony/lib/toolkit/class.fieldmanager.php:271]
    MySQL->fetch();
[/Applications/MAMP/htdocs/ABCDEF/extensions/selectbox_link_field/fields/field.selectbox_link.php:214]
    FieldManager::fetch();
[/Applications/MAMP/htdocs/ABCDEF/extensions/selectbox_link_field/fields/field.selectbox_link.php:599]
    FieldSelectBox_Link->findRelatedValues();
[/Applications/MAMP/htdocs/ABCDEF/symphony/content/content.publish.php:290]
    FieldSelectBox_Link->prepareTableValue();
[/Applications/MAMP/htdocs/ABCDEF/symphony/content/content.publish.php:81]
    contentPublish->__viewIndex();
[/Applications/MAMP/htdocs/ABCDEF/symphony/content/content.publish.php:85]
    contentPublish->__switchboard();
[/Applications/MAMP/htdocs/ABCDEF/symphony/lib/toolkit/class.administrationpage.php:430]
    contentPublish->view();
[/Applications/MAMP/htdocs/ABCDEF/symphony/lib/core/class.administration.php:256]
    AdministrationPage->build();
[/Applications/MAMP/htdocs/ABCDEF/symphony/lib/core/class.administration.php:454]
    Administration->__buildPage();
[/Applications/MAMP/htdocs/ABCDEF/index.php:22]
    Administration->display();
Database Query Log
[0.0001] SET character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8';
[0.0001] SET CHARACTER SET 'utf8';
[0.0001] SET time_zone = '-04:00';
[0.0013] 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;
[0.0002] SELECT SQL_CACHE `session_data` FROM `sym_sessions` WHERE `session` = '2f3c63c529c3830104200e71ad8deae7' LIMIT 1;
[0.0002] SELECT SQL_CACHE a.* FROM `sym_authors` AS `a` WHERE `username` = 'Pat' ORDER BY a.id ASC LIMIT 1;
[0.0002] UPDATE sym_authors SET `last_seen` = '2013-07-21 17:04:17' WHERE `id` = 1;
[0.0002] SELECT SQL_CACHE `name` FROM `sym_extensions` WHERE `status` = 'enabled';
[0.0003] SELECT SQL_CACHE * FROM `sym_extensions`;
[0.0004] SELECT SQL_CACHE `s`.* FROM `sym_sections` AS `s` ORDER BY `s`.`sortorder` asc;
[0.0003] SELECT SQL_CACHE `id` FROM `sym_sections` WHERE `handle` = 'listings' LIMIT 1;
[0.0003] SELECT SQL_CACHE count(`e`.id) as `count` FROM `sym_entries` AS `e` WHERE `e`.`section_id` = '7';
[0.0002] SELECT SQL_CACHE `id` FROM `sym_sections` WHERE `handle` = 'listings' LIMIT 1;
[0.0004] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`parent_section` = '7' ORDER BY t1.`sortorder` ASC;
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (45,165);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_checkbox` WHERE `field_id` IN (50);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_incrementnumber` WHERE `field_id` IN (46);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_selectbox_link` WHERE `field_id` IN (85,93);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_date` WHERE `field_id` IN (26);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_select` WHERE `field_id` IN (23,97,88,62,63,72,33,64,89);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_datetime` WHERE `field_id` IN (29);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_number` WHERE `field_id` IN (44);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_addresslocation` WHERE `field_id` IN (87);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_textbox` WHERE `field_id` IN (47,48);
[0.0003] SELECT SQL_CACHE DISTINCT (s.id), f.id as `field_id` FROM `sym_sections` AS `s` LEFT JOIN `sym_fields` AS `f` ON `s`.id = `f`.parent_section WHERE `f`.id IN ('') ORDER BY s.sortorder ASC;
[0.0003] SELECT SQL_CACHE DISTINCT (s.id), f.id as `field_id` FROM `sym_sections` AS `s` LEFT JOIN `sym_fields` AS `f` ON `s`.id = `f`.parent_section WHERE `f`.id IN ('91') ORDER BY s.sortorder ASC;
[0.0002] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(90);
[0.0002] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (90);
[0.0008] SELECT SQL_CACHE `e`.id, `e`.section_id, e.`author_id`, UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date`, UNIX_TIMESTAMP(e.`modification_date`) AS `modification_date` FROM `sym_entries` AS `e` WHERE 1 AND `e`.`section_id` = '10' ORDER BY ( SELECT `ed`.value FROM sym_entries_data_90 AS `ed` WHERE entry_id = e.id ) DESC LIMIT 0, 20;
[0.0002] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND id IN (91) ORDER BY t1.`sortorder` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_uniqueupload` WHERE `field_id` IN (91);
[0.0003] SELECT SQL_CACHE e.id, e.section_id, s.name, s.handle FROM `sym_entries` AS `e` LEFT JOIN `sym_sections` AS `s` ON (s.id = e.section_id) WHERE e.id IN (1358,1357,1335,1334,1332,1330,1329,1327,1326,1324,1323,1304,1303,1302,1293,1278,1277,1273,1272,1271);
[0.0005] SELECT SQL_CACHE `e`.id, `e`.section_id, e.`author_id`, UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date`, UNIX_TIMESTAMP(e.`modification_date`) AS `modification_date` FROM `sym_entries` AS `e` WHERE 1 AND `e`.`id` IN ('1271', '1272', '1273', '1277', '1278', '1293', '1302', '1303', '1304', '1323', '1324', '1326', '1327', '1329', '1330', '1332', '1334', '1335', '1357', '1358') AND `e`.`section_id` = '10' ORDER BY ( SELECT `ed`.value FROM sym_entries_data_90 AS `ed` WHERE entry_id = e.id ) DESC;
[0.0002] SELECT SQL_CACHE `id` FROM `sym_fields` WHERE 1 AND `parent_section` = 10 AND `element_name` IN ('image') ORDER BY `sortorder` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_entries_data_91` WHERE `entry_id` IN (1358,1357,1335,1334,1332,1330,1329,1327,1326,1324,1323,1304,1303,1302,1293,1278,1277,1273,1272,1271) ORDER BY `id` ASC;
[0.0003] SELECT SQL_CACHE `id` FROM `sym_sections` WHERE `handle` = 'listings' LIMIT 1;
[0.0007] SELECT SQL_CACHE `e`.id, `e`.section_id, e.`author_id`, UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date`, UNIX_TIMESTAMP(e.`modification_date`) AS `modification_date` FROM `sym_entries` AS `e` WHERE 1 AND `e`.`section_id` = '7' ORDER BY ( SELECT `ed`.value FROM sym_entries_data_45 AS `ed` WHERE entry_id = e.id ) DESC LIMIT 0, 20;
[0.0002] SELECT SQL_CACHE `id` FROM `sym_fields` WHERE `parent_section` = 7 ORDER BY `sortorder` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_entries_data_45` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0002] SELECT SQL_CACHE * FROM `sym_entries_data_50` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0002] SELECT SQL_CACHE * FROM `sym_entries_data_46` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0002] SELECT SQL_CACHE * FROM `sym_entries_data_85` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0002] SELECT SQL_CACHE * FROM `sym_entries_data_26` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0002] SELECT SQL_CACHE * FROM `sym_entries_data_23` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0002] SELECT SQL_CACHE * FROM `sym_entries_data_97` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0002] SELECT SQL_CACHE * FROM `sym_entries_data_29` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0002] SELECT SQL_CACHE * FROM `sym_entries_data_44` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0004] SELECT SQL_CACHE * FROM `sym_entries_data_87` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_entries_data_88` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_entries_data_165` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_entries_data_47` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_entries_data_48` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_entries_data_62` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0005] SELECT SQL_CACHE * FROM `sym_entries_data_63` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0004] SELECT SQL_CACHE * FROM `sym_entries_data_72` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_entries_data_33` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_entries_data_64` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0005] SELECT SQL_CACHE * FROM `sym_entries_data_89` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0003] SELECT SQL_CACHE * FROM `sym_entries_data_93` WHERE `entry_id` IN (1356,1342,1341,1325,1301,1292,1269,1262,1248,1226,1217,1211,1207,1198,1151,1139,1110,1069,1060,931) ORDER BY `id` ASC;
[0.0004] SELECT SQL_CACHE count(`e`.id) as `count` FROM `sym_entries` AS `e` WHERE `e`.`section_id` = '7';
[0.0003] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`parent_section` = '7' AND t1.show_column = 'yes' ORDER BY t1.`sortorder` ASC;
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` IN (45,165);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_checkbox` WHERE `field_id` IN (50);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_incrementnumber` WHERE `field_id` IN (46);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_selectbox_link` WHERE `field_id` IN (85);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_datetime` WHERE `field_id` IN (29);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_number` WHERE `field_id` IN (44);
[0.0001] SELECT SQL_CACHE * FROM `sym_fields_addresslocation` WHERE `field_id` IN (87);
[0.0003] SELECT SQL_CACHE * FROM `sym_sections_association` AS `sa`, `sym_sections` AS `s` WHERE `sa`.`parent_section_id` = 7 AND `s`.`id` = `sa`.`child_section_id` AND `sa`.`hide_association` = 'no' ORDER BY `s`.`sortorder` ASC;

Figured out the problem.

Previously, I had updated all my git submodules when I was still on Symphony 2.3.2. This pulled in the latest selectbox_link_field, which was not compatible with 2.3.2. When I tried to edit and save a section, Symphony gave me an error. I assume this messed up my section.

After I updated to 2.3.3, I started getting this error when viewing the section that I tried to edit before. I had to edit the section again, as my SBL field had lost its value setting. Now it's fine.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details