Forum OpenACS Q&A: portals and education modules in ACS 3.2.4

The education module data model is not loaded by default in ACS 3.2.4. This is fine (the data model with its numerous triggers is hairy to read, and very difficult to comprehend). However, since the education module also creates tables that the portal module expects, there are admin functions that will generate errors due to missing database tables from the education module. For example, the default "Current Weather" portal table expects the "portal_weather" database table to be created. If you try to edit this table (in /portals/admin), it will not properly generate the portal table but will produce this error:
[24/Sep/2000:21:50:45][3211.98309][-conn20-] Error: Ns_PgExec: result
status: 7 message: ERROR:  Relation 'portal_weather' does not exist

[24/Sep/2000:21:50:45][3211.98309][-conn20-] Error: nsd.tcl: Database
operation "select" failed (exception NSDB, "Query was not a statement
returning rows.")
Database operation "select" failed (exception NSDB, "Query was not a
statement returning rows.")
    while executing
"ns_db select $db "
	select * from portal_weather where user_id=$user_id""
    (procedure "DisplayWeather" line 7)
    invoked from within
"DisplayWeather $db"
    invoked from within
"set html [DisplayWeather $db]"
    invoked from within chunk: 1 of adp: ns_adp_parse

The problem is that the database table "portal_weather" is created in education.sql, which is commented out by default in ACS 3.2.4. The rest of the sample portal tables also have the same problem, as they depend on tables created by education.sql. I guess we just have to ignore the default portal tables code -- they won't work unless you load the education module's data model (if this is worth it). This is FYI, so that you wont waste time as I did trying to figure out what is wrong with the default installation of the portal module.

It seems to me that although ACS is composed of "modules", ACS is not very modular. Not loading one module may have unexpected consequences to other modules. Oh well, until ACS 4.0 comes out, we just have to be more careful when any module is not included in the installation. Note that there are at least two modules not loaded in ACS 3.2.4: education and bookmarks.

Collapse
Posted by Ben Adida on
You are absolutely correct that OpenACS/ACS is currently not modular. You are also right to expect much out of ACS/OpenACS 4.0. Thanks for pointing out this particular portals issue. Let's try to make things cleaner for 3.2.5.