System error.

The following error message was returned:

Unknown column 'tab.files' in 'ORDER BY'

The query was:

SELECT tab.* FROM ((SELECT 0 as `isgal`, tf.`fileId` as `id`, tf.`galleryId` as `parentId`, tf.`name`, tf.`description`, tf.`filesize` as `size`, tf.`created`, tf.`filename`, tf.`filetype` as `type`, tf.`user` as `creator`, tf.`author`, tf.`hits`, tf.`lastDownload`, tf.`votes`, tf.`points`, tf.`path`, tf.`reference_url`, tf.`is_reference`, tf.`hash`, tf.`search_data`, tf.`metadata`, tf.`lastModif` as `lastModif`, tf.`lastModifUser` as `last_user`, tf.`lockedby`, tf.`comment`, tf.`deleteAfter`, tf.`maxhits`, tf.`archiveId`, tf.`ocr_state`, '' as `visible`, '' as `public`, tf.`fileId`, tf.`galleryId`, tf.`filesize`, tf.`filetype`, tf.`user`, tf.`lastModifUser`, 0 as `icon_fileId`, count(tfh.`fileId`) as `nbArchives` FROM `tiki_files` as tf LEFT JOIN `tiki_files` tfh ON (tf.`fileId` = tfh.`archiveId`) WHERE tf.`archiveId`=0 AND tf.`galleryId`=? GROUP BY tf.`fileId`, tf.`fileId`, tf.`galleryId`, tf.`name`, tf.`description`, tf.`filesize`, tf.`created`, tf.`filename`, tf.`filetype`, tf.`user`, tf.`author`, tf.`hits`, tf.`lastDownload`, tf.`votes`, tf.`points`, tf.`path`, tf.`reference_url`, tf.`is_reference`, tf.`hash`, tf.`search_data`, tf.`metadata`, tf.`lastModif`, tf.`lastModifUser`, tf.`lockedby`, tf.`comment`, tf.`deleteAfter`, tf.`maxhits`, tf.`archiveId`, tf.`fileId`, tf.`galleryId`, tf.`filesize`, tf.`filetype`, tf.`user`, tf.`lastModifUser`) UNION ALL (SELECT 1 as `isgal`, tfg.`galleryId` as `id`, tfg.`parentId`, tfg.`name`, tfg.`description`, 0 as `size`, tfg.`created`, tfg.`name` as `filename`, tfg.`type`, tfg.`user` as `creator`, '' as `author`, tfg.`hits`, 0 as `lastDownload`, tfg.`votes`, tfg.`points`, '' as `path`, '' as `reference_url`, '' as `is_reference`, '' as `hash`, tfg.`name` as `search_data`, '' as `metadata`, tfg.`lastModif` as `lastModif`, '' as `last_user`, '' as `lockedby`, '' as `comment`, '' as `deleteAfter`, '' as `maxhits`, 0 as `archiveId`, '' as `ocr_state`, tfg.`visible`, tfg.`public`, tfg.`galleryId` as `fileId`, tfg.`parentId` as `galleryId`, 0 as `filesize`, tfg.`type` as `filetype`, tfg.`user`, '' as `lastModifUser`, `icon_fileId`, 0 as `nbArchives` FROM `tiki_file_galleries` as tfg WHERE 1=1 AND tfg.`parentId`=? AND (tfg.`user`=? OR tfg.`visible`='y' OR tfg.`public`='y') )) as tab WHERE (tab.`name` LIKE ? OR tab.`description` LIKE ? OR tab.`filename` LIKE ?) ORDER BY `isgal` desc, tab.`files` asc LIMIT 50, 10

Values:

  1. 44
  2. 44
  3. %%
  4. %%
  5. %%

The built query was likely:

SELECT tab.* FROM ((SELECT 0 as `isgal`, tf.`fileId` as `id`, tf.`galleryId` as `parentId`, tf.`name`, tf.`description`, tf.`filesize` as `size`, tf.`created`, tf.`filename`, tf.`filetype` as `type`, tf.`user` as `creator`, tf.`author`, tf.`hits`, tf.`lastDownload`, tf.`votes`, tf.`points`, tf.`path`, tf.`reference_url`, tf.`is_reference`, tf.`hash`, tf.`search_data`, tf.`metadata`, tf.`lastModif` as `lastModif`, tf.`lastModifUser` as `last_user`, tf.`lockedby`, tf.`comment`, tf.`deleteAfter`, tf.`maxhits`, tf.`archiveId`, tf.`ocr_state`, '' as `visible`, '' as `public`, tf.`fileId`, tf.`galleryId`, tf.`filesize`, tf.`filetype`, tf.`user`, tf.`lastModifUser`, 0 as `icon_fileId`, count(tfh.`fileId`) as `nbArchives` FROM `tiki_files` as tf LEFT JOIN `tiki_files` tfh ON (tf.`fileId` = tfh.`archiveId`) WHERE tf.`archiveId`=0 AND tf.`galleryId`='44' GROUP BY tf.`fileId`, tf.`fileId`, tf.`galleryId`, tf.`name`, tf.`description`, tf.`filesize`, tf.`created`, tf.`filename`, tf.`filetype`, tf.`user`, tf.`author`, tf.`hits`, tf.`lastDownload`, tf.`votes`, tf.`points`, tf.`path`, tf.`reference_url`, tf.`is_reference`, tf.`hash`, tf.`search_data`, tf.`metadata`, tf.`lastModif`, tf.`lastModifUser`, tf.`lockedby`, tf.`comment`, tf.`deleteAfter`, tf.`maxhits`, tf.`archiveId`, tf.`fileId`, tf.`galleryId`, tf.`filesize`, tf.`filetype`, tf.`user`, tf.`lastModifUser`) UNION ALL (SELECT 1 as `isgal`, tfg.`galleryId` as `id`, tfg.`parentId`, tfg.`name`, tfg.`description`, 0 as `size`, tfg.`created`, tfg.`name` as `filename`, tfg.`type`, tfg.`user` as `creator`, '' as `author`, tfg.`hits`, 0 as `lastDownload`, tfg.`votes`, tfg.`points`, '' as `path`, '' as `reference_url`, '' as `is_reference`, '' as `hash`, tfg.`name` as `search_data`, '' as `metadata`, tfg.`lastModif` as `lastModif`, '' as `last_user`, '' as `lockedby`, '' as `comment`, '' as `deleteAfter`, '' as `maxhits`, 0 as `archiveId`, '' as `ocr_state`, tfg.`visible`, tfg.`public`, tfg.`galleryId` as `fileId`, tfg.`parentId` as `galleryId`, 0 as `filesize`, tfg.`type` as `filetype`, tfg.`user`, '' as `lastModifUser`, `icon_fileId`, 0 as `nbArchives` FROM `tiki_file_galleries` as tfg WHERE 1=1 AND tfg.`parentId`='44' AND (tfg.`user`=NULL OR tfg.`visible`='y' OR tfg.`public`='y') )) as tab WHERE (tab.`name` LIKE '%%' OR tab.`description` LIKE '%%' OR tab.`filename` LIKE '%%') ORDER BY `isgal` desc, tab.`files` asc LIMIT 50, 10

Things to check:

  1. Is your database up and running?

  2. Is your database corrupt? Please see how to repair your database

  3. Are your database settings accurate? (username, schema name, etc in db/local.php)

  4. Did you complete the Tiki Installer?

Please see the documentation for more information.