Error in query number 1
We are sorry, but an error occurred while generating this page. You should contact the site's administrator.
Error in function call sqlpage.run_sql('_post_navigation.sql').
Expected sqlpage.run_sql(sql_file_path, variables)
Backtrace
run_sql: unable to run "_post_navigation.sql"
In "_post_navigation.sql": The following error occurred while executing an SQL statement:
error communicating with database: connection aborted
The SQL statement sent by SQLPage was:
WITH current_post AS (SELECT p.id_seq, t.language_code FROM post AS p JOIN translations AS t ON t.element_id = p.id WHERE p.id = CAST($1 AS TEXT)::INT AND t.element_type = 'post_post'), previous_post AS (SELECT p.id, p.title, p.id_seq FROM post AS p JOIN translations AS t ON t.element_id = p.id WHERE t.element_type = 'post_post' AND t.language_code = (SELECT language_code FROM current_post) AND p.id_seq < (SELECT id_seq FROM current_post) ORDER BY p.id_seq DESC LIMIT 1), previous_post_exists AS (SELECT COUNT(*) AS count FROM previous_post) SELECT CASE WHEN previous_post_exists.count = 0 THEN NULL ELSE previous_post.title END AS title, CASE WHEN previous_post_exists.count = 0 THEN NULL ELSE 'post?id=' || previous_post.id || '&lang=' || CAST($2 AS TEXT) END AS link, true AS space_after, 'nav-left' AS id, 'chevron-compact-left' AS icon, CASE WHEN previous_post_exists.count = 0 THEN true ELSE false END AS disabled FROM previous_post_exists LEFT JOIN previous_post ON previous_post_exists.count > 0;
Note: You can hide error messages like this one from your users by setting the 'environment' configuration option to 'production'.