Forum OpenACS Q&A: ERROR: missing FROM-clause entry for table

Hello,

We just upgrade openacs core from 5.2.3 to 5.4.3 and Postgresql 7.4 to 8.1.

And everything was fine since we try to create new page with edit-this-page and new news. We got this error for etp:

Database operation "0or1row" failed
(exception ERROR, "ERROR: missing FROM-clause entry for table "content_item_globals"
CONTEXT: SQL statement "SELECT content_item_globals.c_root_folder_id"
PL/pgSQL function "etp__get_folder_id" line 14 at assignment
")
pqerror was: "ERROR: missing FROM-clause entry for table "content_item_globals"
CONTEXT: SQL statement "SELECT content_item_globals.c_root_folder_id"
PL/pgSQL function "etp__get_folder_id" line 14 at assignment
"
(Status of PQexec call: PGRES_FATAL_ERROR)
SQL:
select content_folder__new('tc_fr', 'TC FR test denis', '', coalesce(etp__get_folder_id('461'), NULL));

and this one for the news :

Database operation "0or1row" failed
(exception ERROR, "ERROR: missing FROM-clause entry for table "acs_object_id_seq"
CONTEXT: SQL statement "SELECT acs_object_id_seq.nextval from dual"
PL/pgSQL function "news__new" line 43 at select into variables
")
pqerror was: "ERROR: missing FROM-clause entry for table "acs_object_id_seq"
CONTEXT: SQL statement "SELECT acs_object_id_seq.nextval from dual"
PL/pgSQL function "news__new" line 43 at select into variables

We pass all the upgrade sql script for the core

Any help welcome

regards

Denis

Collapse
Posted by Gustaf Neumann on
Switch the flag "add_missing_from" in the postgres config on and these things will work (see https://openacs.org/xowiki/How_to_install_in_Postgres_8.x)

acs-core should be free from this kind of legacy stuff, i did not go through all application packages when i fixed these some time ago.