Forum OpenACS Q&A: Problems installing dowload package with OpenACS 5.1.4

Hi,
I tried to install the download package today but got several error messages:

o.title and o.package_id don't exist. So I removed them from the download-create.sql manually.

Now when I try to create a new repository I get the following exception:

Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR: function content_item__new(character varying, integer, integer, "unknown", timestamp with time zone, integer, integer, character varying, "unknown", "unknown", character varying, character varying, "unknown", "unknown", character varying, "unknown", integer) does not exist
HINT: No function matches the given name and argument types. You may need to add explicit type casts.
CONTEXT: PL/pgSQL function "download_rep__new" line 17 at select into variables

SQL:
select download_rep__new(
'908999',
'Test',
NULL,
NULL,
now(),
'27685',
'908825',
'908825',
'908825',
null
);

while executing
"ns_pg_bind 0or1row nsdb0 {
select download_rep__new(
:repository_id,
:title,
:description,
:help_text,
now(),
:user_id,
..."

Any idea why the installation failed?

Greetings,
Nima

Collapse
Posted by Dave Bauer on
You have the wrong version of the download package, if it is looking for title and package_id in acs_objects.
I tried 5.1d1. So why doesn't the Installer complain and which version would I need?
Collapse
Posted by Dave Bauer on
Where did you get the package from? It does appear that he version of download on HEAD and oacs-5-1 branch both have the same version number, which would confuse the installer. You definitely should not use any packages from HEAD with a 5.1.x install.
Similar-ish...

I've downloaded the 5.20b1 tarball and installed it.
Then from acs-admin/install I chose "Install from Repository" and installed the download package.

The list of installed packages on acs-admin/install is telling me that it's Download 5.1d1

... and it doesn't work.  I've added two types of archive, "OACS code" and "Palm OS code" but when I try to add an archive, it chokes.  Here's how

Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

Looking at the log for more details, I see

[04/Oct/2005:17:46:05][21937.114696][-conn:bitdojo::4] Error: Ns_PgExec: result status: 7 message: ERROR:  -20000: Cou\ld not find a root folder for item ID 608. Either the item does not exist or its parent value is corrupted.
CONTEXT:  PL/pgSQL function "content_item__new" line 50 at assignment
PL/pgSQL function "content_item__new" line 20 at assignment
PL/pgSQL function "__exec_5_archive_new" line 45 at assignment

[04/Oct/2005:17:46:05][21937.114696][-conn:bitdojo::4] Error: Ns_PgExec: result status: 7 message: ERROR:  current tran\saction is aborted, commands ignored until end of transaction block

As an aside, I also get the following:

[04/Oct/2005:17:46:05][21937.114696][-conn:bitdojo::4] Error: rp_report_error: Error rendering error page (!)
can't read "error_desc": no such variable

Any tips would be appreciated.  Anything having to do with the content repository just gives me headaches <g>.

I had a similar problem before. It seems that just downloading from head or install from repository will give an older version (version 5.1). Should this happen?
Example (look at what version is at the top):
http://cvs.openacs.org/cvs/openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql?rev=1.65&view=log

Which means I will get version 1.50.2.10 instead of 1.65.2.2. This is the case for almost every package/file in the cvs (another one is packages/acs-tcl/tcl/request-processor-procs.tcl). It might have to do with my beginner knowledge of CVS but it seems I am not alone to download the wrong files. Is it possible to make the latest version appear on top or how should I type the cvs command to get the latest version?

Now this problem you all are having is because of the function content_item__get_root_folder in the database.

Get the correct version of content-item.sql (and other files with the wrong version) and re-install/re-run the faulty scripts to update the functions.