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 ',sort ASC' at line 1
in this syntax SELECT `node`.`node_id`, `node`.`node`, `node`.`application`, `node`.`area`, `node`.`name`, `node`.`path`, `node`.`parent`, `node`.`rank`, `node`.`sort`, `node`.`status`, `node`.`created`, `node_page`.`title`, `node_page`.`notes` FROM `node` LEFT JOIN `node_page` ON `node`.`node_id` = `node_page`.`node_id` WHERE node.status = '0' AND node.application = 'forum' AND (node.path = '1,21' OR node.path LIKE '1,21,%') AND node_page.languages = 'default' ORDER BY rank,sort ASC