SQL Error - function page->get_navigation() (error thrown at line 594): reading structure failed [Query: select p.*, count(p.uid) as maxversions, tp.l, tp.r, tp.type, tp.level, tp.uid from temppage tp join page p on tp.uid=p.uid LEFT JOIN security s ON s.objecttype='page' AND s.objectuid=tp.uid where (p.language='en' AND s.authorisation="READ" AND ((s.authoriseduid="30173" OR s.authoriseduid="30173") OR s.authoriseduid="220277") and p.clearancelevel IN (ifnull((select min(x.clearancelevel) from page x where x.uid = p.uid and x.clearancelevel>=10 and x.language='en' group by x.uid),0)) ) group by tp.uid HAVING if(min(p.version) IS NULL,tp.uid,min(p.version)) ORDER BY tp.l;]