« MODx Parse Error »

MODx encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - 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 sc.id IN (1,51,19,10,2,3,11,6,5,20,7,15,21,9,22,14,24,34, »
      SQL: SELECT DISTINCT sc.id, sc.menutitle, sc.pagetitle, sc.introtext, sc.menuindex, sc.published, sc.hidemenu, sc.parent, sc.isfolder, sc.description, sc.alias, sc.longtitle, sc.type,if(sc.type='reference',sc.content,'') as content, sc.template, sc.link_attributes FROM `w_gabric`.`modx_site_content` sc LEFT JOIN `w_gabric`.`modx_document_groups` dg ON dg.document = sc.id WHERE sc.published=1 AND sc.deleted=0 AND (sc.privateweb=0) AND sc.hidemenu=0 AND (sc.id NOT IN (10,11,20,15,21,22,14,18,17,13,16,23,29,28,53,50,19`)) AND sc.id IN (1,51,19,10,2,3,11,6,5,20,7,15,21,9,22,14,24,34,18,17,83,13,16,23,28,29,53,137,136,50) GROUP BY sc.id ORDER BY sc.menuindex ASC ;
      [Copy SQL to ClipBoard]
 
Parser timing
  MySQL: 0.0043 s(3 Requests)
  PHP: 0.0762 s 
  Total: 0.0806 s