Unexpected Error when users other than admin try to view the site map

Permalink
Hello!
I'm working on a 5.6 site that recently had to be restored from a backup. The hosting company did the restoration and I'm not impressed. I've been having db error after db error. This is the latest one that I can't seem to figure out:

Whenever I'm logged in as the admin account, I can pull up the sitemap without any problem. If I'm logged in with any other account and try to pull up the sitemap, I get the following error message:

mysqli error: [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 ')) > 0 or (p1.cPointerExternalLink !='' AND p1.cPointerExternalLink IS NOT NU' at line 2] in EXECUTE("select p1.cID, pt.ctHandle from Pages p1 left join Pages p2 on (p1.cPointerID = p2.cID) left join PagePaths on (PagePaths.cID = p1.cID and PagePaths.ppIsCanonical = 1) left join PageSearchIndex psi on (psi.cID = if(p2.cID is null, p1.cID, p2.cID)) inner join CollectionVersions cv on (cv.cID = if(p2.cID is null, p1.cID, p2.cID) and cvID = (select max(cvID) from CollectionVersions where cID = cv.cID)) left join PageTypes pt on pt.ctID = cv.ctID inner join Collections c on (c.cID = if(p2.cID is null, p1.cID, p2.cID)) left join CollectionSearchIndexAttributes on (CollectionSearchIndexAttributes.cID = if (p2.cID is null, p1.cID, p2.cID)) where 1=1 and p1.cParentID = '0' and (p1.cIsTemplate = 0 or p2.cIsTemplate = 0) and ((select count(cID) from PagePermissionAssignments ppa1 inner join PermissionAccessList pa1 on ppa1.paID = pa1.paID where ppa1.cID = if(p2.cID is null, p1.cInheritPermissionsFromCID, p2.cInheritPermissionsFromCID) and pa1.accessType = 10 and pa1.pdID in (0) and pa1.peID in (1,2,3,6,5,4) and (if(pa1.peID = 5 and p1.uID <>7, false, true)) and (ppa1.pkID = )) > 0 or (p1.cPointerExternalLink !='' AND p1.cPointerExternalLink IS NOT NULL)) and ((select count(cID) from PagePermissionAssignments ppaExclude inner join PermissionAccessList paExclude on ppaExclude.paID = paExclude.paID where ppaExclude.cID = if(p2.cID is null, p1.cInheritPermissionsFromCID, p2.cInheritPermissionsFromCID) and accessType = -1 and pdID in (0) and paExclude.peID in (1,2,3,6,5,4) and (if(paExclude.peID = 5 and p1.uID <>7, false, true)) and (ppaExclude.pkID = )) = 0) and p1.cIsActive = '1' and (p1.cIsSystemPage = 0 or p2.cIsSystemPage = 0) ")


I'm at a loss for what is causing this or what steps I need to take to fix it.

Any help would be greatly appreciated.

rainmaker
 
tabercreative replied on at Permalink Reply
tabercreative
I'm having the same issue. Did you ever figure this out? Any info would be appreciated.
tabercreative replied on at Permalink Reply
tabercreative