Error Message Help

Permalink
Hi, I am using a block called "document Library" with a search function. When I try to search for a document I get the following error.

An unexpected error occurred.
An exception occurred while executing 'SELECT distinct n.treeNodeID, if(nt.treeNodeTypeHandle='file', fv.fvTitle, n.treeNodeName) as folderItemName, if(nt.treeNodeTypeHandle='file', fv.fvDateAdded, n.dateModified) as folderItemModified, case when nt.treeNodeTypeHandle='search_preset' then 1 when nt.treeNodeTypeHandle='file_folder' then 2 else (10 + fvType) end as folderItemType, fv.fvSize as folderItemSize, ak_Text FROM TreeNodes n INNER JOIN TreeNodeTypes nt ON nt.treeNodeTypeID = n.treeNodeTypeID LEFT JOIN TreeFileNodes tf ON tf.treeNodeID = n.treeNodeID LEFT JOIN FileVersions fv ON tf.fID = fv.fID and fv.fvIsApproved = 1 LEFT JOIN FileSearchIndexAttributes fis ON fv.fID = fis.fID WHERE ((fv.fvFilename LIKE ?) OR (fv.fvDescription LIKE ?) OR (fv.fvTitle LIKE ?) OR (fv.fvTags LIKE ?) OR (fv.fvTags LIKE ?) OR (n.treeNodeName LIKE ?) OR (ak_image_tag LIKE ?) OR (ak_gallery_columns LIKE ?) OR (ak_internal_link_cid LIKE ?) OR (ak_external_link_url LIKE ?) OR (ak_link_type LIKE ?) OR (ak_image_link LIKE ?) OR (ak_image_link_text LIKE ?) OR (ak_image_thumbnail_width LIKE ?)) AND (n.treeNodeParentID IN ('1923', '1972', '1973', '1974', '1975', '1976', '1978', '1979', '1980', '2801')) ORDER BY ak_Text asc LIMIT 20 OFFSET 0' with params ["%August 2018%", "%August 2018%", "%August 2018%", "%August 2018%", "%August 2018%", "%August 2018%", "%August 2018%", "%August 2018%", "%August 2018%", "%August 2018%", "%August 2018%", "%August 2018%", "%August 2018%", "%August 2018%"]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ak_internal_link_cid' in 'where clause'

Has anybody got any idea what is wrong please?

View Replies:
hutman replied on at Permalink Reply
hutman
Does your site have an attribute with the handle "internal_link_cid"? The query doesn't seem to be able to find it.
swinn replied on at Permalink Reply
As far as I know we haven't. Basically, we put the document library block on a page of our web site, pointed it at a few folders with files in and it produced a list on the page as we expected , but when we used the built in search facility to search for a particular file we got that error.
hutman replied on at Permalink Reply
hutman
If you go to Dashboard -> Files -> Attributes you should be able to see for sure. If it doesn't exist there, I would create it. If it does exist there check the box for "Content included in search index." and then go to Dashboard -> System & Settings -> Automated Jobs and run the "Index Search Engine - All" job.
swinn replied on at Permalink Reply
Thanks again for that. It does exist and the box is checked so I am running the index and see what happens.
swinn replied on at Permalink Reply
Hi, I have followed your instructions and I am still getting an error …
hutman replied on at Permalink Reply
hutman
What is the error?
swinn replied on at Permalink Reply
The error is:

An exception occurred while executing 'SELECT distinct n.treeNodeID, if(nt.treeNodeTypeHandle='file', fv.fvTitle, n.treeNodeName) as folderItemName, if(nt.treeNodeTypeHandle='file', fv.fvDateAdded, n.dateModified) as folderItemModified, case when nt.treeNodeTypeHandle='search_preset' then 1 when nt.treeNodeTypeHandle='file_folder' then 2 else (10 + fvType) end as folderItemType, fv.fvSize as folderItemSize FROM TreeNodes n INNER JOIN TreeNodeTypes nt ON nt.treeNodeTypeID = n.treeNodeTypeID LEFT JOIN TreeFileNodes tf ON tf.treeNodeID = n.treeNodeID LEFT JOIN FileVersions fv ON tf.fID = fv.fID and fv.fvIsApproved = 1 LEFT JOIN FileSearchIndexAttributes fis ON fv.fID = fis.fID WHERE ((fv.fvFilename LIKE ?) OR (fv.fvDescription LIKE ?) OR (fv.fvTitle LIKE ?) OR (fv.fvTags LIKE ?) OR (fv.fvTags LIKE ?) OR (n.treeNodeName LIKE ?) OR (ak_image_tag LIKE ?) OR (ak_gallery_columns LIKE ?) OR (ak_internal_link_cid LIKE ?) OR (ak_external_link_url LIKE ?) OR (ak_link_type LIKE ?) OR (ak_image_link LIKE ?) OR (ak_image_link_text LIKE ?) OR (ak_image_thumbnail_width LIKE ?)) AND (n.treeNodeParentID IN ('1870')) ORDER BY fv.fvTitle asc LIMIT 20 OFFSET 0' with params ["%Abide%", "%Abide%", "%Abide%", "%Abide%", "%Abide%", "%Abide%", "%Abide%", "%Abide%", "%Abide%", "%Abide%", "%Abide%", "%Abide%", "%Abide%", "%Abide%"]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ak_internal_link_cid' in 'where clause'