Error for no reason

Permalink
Hi everybody !

I was quietly editing my website when an error occured. The last thing I did was adding new topics and deleting old topics.
I don't understand what's wrong...
The error message is :

"An exception occurred while executing 'SELECT p.cID FROM Pages p LEFT JOIN PagePaths pp ON (p.cID = pp.cID and pp.ppIsCanonical = true) LEFT JOIN PageSearchIndex psi ON p.cID = psi.cID LEFT JOIN PageTypes pt ON p.ptID = pt.ptID INNER JOIN Collections c ON p.cID = c.cID INNER JOIN CollectionVersions cv ON p.cID = cv.cID LEFT JOIN CollectionSearchIndexAttributes csi ON c.cID = csi.cID WHERE (cvName != ?) AND (()) AND (ak_exclude_page_list <> 1 or ak_exclude_page_list is null) AND (p.cParentID = ?) AND (p.cPointerID < 1) AND (p.cIsTemplate = 0) AND (cvIsApproved = 1) AND (p.cIsActive = ?) ORDER BY cv.cvDatePublic asc' with params ["", "256", true]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (ak_exclude_page_list <> 1 or ak_exclude_page_list is null) AND (p.cParen' at line 1"

I hope someone could help me...

Thank you by andance ! :)

martinlebrun
 
Doki replied on at Permalink Reply
Doki
I had this error. Try this:

First, go to Pages & Theme -> Attributes [Your site]/index.php/dashboard/pages/attributes exclude_page_list and select Exclude Page List. Make sure that the "Content included in search index" option is checked (also check "Field available in advanced search." just to be safe).

Next, Under Systems & Settings -> Optimization -> Automated Jobs [Your site]/index.php/dashboard/system/optimization/jobs On the Index Search Engine - All line, hit the run button. Wait for the job to complete.

Check again if your page loads properly, if not, try it again, but this time run Index Search Engine - Updates. Wait for it to complete and check again

What might be going on:

It looks like from your MySQL error that your page isn't finding the ak_exclude_page_list row in the CollectionSearchIndexAttributes table (you can physically verify this by looking at the table in your database). This table is dynamically structured depending on what attributes are set to "Content included in search index"; however, this table is not updated until the indexer runs and notices that this attribute does not have a row in the database (the new row should be titled "ak_exclude_page_list".

You should do the above anytime you add a new attribute. Also, be sure to set up a cron to run your indexer periodically in case you ever miss manually running it.

Hopefully this is it.