Forum OpenACS Q&A: Jeff's Photo Album

Collapse
Posted by Tom Mizukami on
I installed Jeff's photo-album package, available at xarg.net, and get the following error. I downloaded and installed the package using the package manager. The system is RH 8.0, PG 7.2.3, OACS 4.6.3-beta2. Thanks for any help.
invalid command name "pa_get_root_folder"
    while executing
"pa_get_root_folder]"
    invoked from within
"subst {[pa_get_root_folder]}"
    ("uplevel" body line 1)
    invoked from within
"uplevel subst \{$apc_default_value($formal_name)\}"
    (procedure "ad_page_contract" line 489)
    invoked from within
"ad_page_contract {

    Photo album front page.  List the albums and subfolders in the folder specified
    Uses package root folder if none specified..."
    ("uplevel" body line 4)
    invoked from within
"uplevel {
    	  # /packages/photo-album/www/index.tcl

ad_page_contract {

    Photo album front page.  List the albums and subfolders in the folder ..."
    (procedure "code::tcl::/web/openpharma/packages/photo-album/www/index" line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
	$handler
      } ad_script_abort val {
	# do nothing
      }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
	rp_serve_abstract_file "$root/$path"
	set tcl_url2file([ad_conn url]) [ad_conn file]
	set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..."
Collapse
2: Re: Jeff's Photo Album (response to 1)
Posted by Michael Steigman on
Did you restart the server after installing the package?
Collapse
3: Re: Jeff's Photo Album (response to 2)
Posted by Tom Mizukami on
Yes, I restarted the server and all other packages are functioning properly.
Collapse
4: Re: Jeff's Photo Album (response to 3)
Posted by Tilmann Singer on
pa_get_root_folder should be defined in photo-album-procs.tcl. Check the error log during system startup if the loading of that file failed for some reason.
Collapse
5: Re: Jeff's Photo Album (response to 1)
Posted by Tom Mizukami on
I searched the logs and there were no warnings related to photo-album, and nothing in the log regarding photo-album-procs.tcl Thanks for the input. The installation portion of the log is below:


[07/Jun/2003:12:11:04][7831.49156][-conn0-] Notice: ns_getform using encoding iso8859-1 for charset iso-8859-1
[07/Jun/2003:12:11:05][7831.49156][-conn0-] Notice: Copying /web/openpharma/apm-workspace/install to /web/openpharma/packages/photo-album
NOTICE:  identifier "acs_object__initialize_attributes" will be truncated to "acs_object__initialize_attribut"
[07/Jun/2003:12:11:06][7831.49156][-conn0-] Notice: Registering ImageMagickPath, , /usr/local/bin
NOTICE:  Adding missing FROM-clause entry for table "acs_object_id_seq"
[07/Jun/2003:12:11:06][7831.49156][-conn0-] Notice: Registering ThumbnailSize, , 150x150
[07/Jun/2003:12:11:06][7831.49156][-conn0-] Notice: Registering ViewerSize, , 700x500
[07/Jun/2003:12:11:06][7831.49156][-conn0-] Notice: Registering ThumbnailsPerPage, , 12
[07/Jun/2003:12:11:06][7831.49156][-conn0-] Notice: Registering PrivilegeForCreator, , admin
[07/Jun/2003:12:11:06][7831.49156][-conn0-] Notice: Registering AcceptableUploadMIMETypes, , image/jpeg,image/gif
[07/Jun/2003:12:11:06][7831.49156][-conn0-] Notice: Registering DefaultRootFolderPrivileges, , the_public read registered_users pa_create_album registered_users pa_create_folder
[07/Jun/2003:12:11:07][7831.49156][-conn0-] Notice: Registering FullTempPhotoDir, , /tmp/photo-album
[07/Jun/2003:12:11:07][7831.49156][-conn0-] Notice: Registering AllowBasePhotoAccessP, , t
[07/Jun/2003:12:11:07][7831.49156][-conn0-] Notice: Registering CheckPermissionOnImageServeP, , f
NOTICE:  identifier "apm_package_version__add_dependency" will be truncated to "apm_package_version__add_depend"
NOTICE:  identifier "apm_package_version__add_dependency" will be truncated to "apm_package_version__add_depend"
NOTICE:  identifier "apm_package_version__add_dependency" will be truncated to "apm_package_version__add_depend"
[07/Jun/2003:12:11:08][7831.49156][-conn0-] Notice: APM/QD = DONE looping through files from which to load queries
[07/Jun/2003:12:11:20][7831.32771][-sched-] Notice: Running scheduled proc search_indexer...
[07/Jun/2003:12:11:20][7831.32771][-sched-] Notice: Done running scheduled proc search_indexer.
[07/Jun/2003:12:11:22][7831.16384][-main-] Notice: tclinit: re-initalizing tcl
[07/Jun/2003:12:11:22][7831.16384][-main-] Notice: tcl: generating interp init script
[07/Jun/2003:12:11:22][7831.49156][-conn0-] Notice: Mounting new instance of package photo-album at /photo-album
NOTICE:  identifier "apm_package__initialize_parameters" will be truncated to "apm_package__initialize_paramet"
Collapse
6: Re: Jeff's Photo Album (response to 1)
Posted by Jarkko Laine on
Tom,

Could you check with the api browser if the procs tcl file is sourced in the first place. Go to yoursite.com/api-doc, then click Photo Album 4.5d and you should have the tcl/photo-album-procs.tcl as the only one in the files list. If it's there, click it and you should see about 25 procs (including the one you're missing) in the public procs listing.

If you don't see the file there at all, it hasn't been sourced. If it is, we have to seek the solution from some other sources.

Collapse
7: Re: Jeff's Photo Album (response to 1)
Posted by Steffen Tiedemann Christensen on
I had this up and working last week and as I recall you may need to go through some of the sql to ensure that enverything is loaded. But, as I recall the most crucial bug is that one of the needed .sql files isn't imported automaticly − importing this manually into you db should do the trick...
Collapse
8: Re: Jeff's Photo Album (response to 7)
Posted by Jarkko Laine on
Steffen,

You're right, there was some hassle with the sql scripts. I've fixed them but they're not yet published anywhere, should be soon, though :)

Collapse
9: Re: Jeff's Photo Album (response to 8)
Posted by Jeff Davis on
I committed the photo-album code on HEAD in the contrib directory. It does not have the oracle support or any other work other folks have done but since it's in CVS I think that should be remedied shortly.
Collapse
10: Re: Jeff's Photo Album (response to 1)
Posted by Steffen Tiedemann Christensen on
Jeff,

Would it be posible to disable the collection support using parameters. I actually had your package running but didn't need the extra features (I ended up hacking the current photo package -- see https://openacs.org/forums/message-view?message_id=104601).

Another nice feature would be to enable comments on pictures...

(anyway, if you've fixed the SQL init problems and added to CVS, I may be doing these things...)

Collapse
11: Re: Jeff's Photo Album (response to 10)
Posted by Jarkko Laine on
I committed the fixes in PostgreSQL datamodel create and drop scripts to contrib dir in CVS.
Collapse
12: Re: Jeff's Photo Album (response to 11)
Posted by Tilmann Singer on
That's cool. Do I see it correctly that the lack of upgrade scripts is the reason why that cannot go into the main photo-album package (instead of the one in contrib), or are there other reasons?

Didn't someone write upgrade scripts?

Collapse
13: Re: Jeff's Photo Album (response to 12)
Posted by Jarkko Laine on
Til,

I think both Michael and Vinod wrote those scripts. I just sent them a message that as soon as they find consensus on their fixes, they could commit the changes to cvs.

IMHO the package is ready for the main cvs after the upgrade scripts are committed, but it's of course up to Jeff to decide it.

Collapse
14: Re: Jeff's Photo Album (response to 1)
Posted by Tom Mizukami on
When I checked with the API browser the package was disabled although the package manager installed it on the site map. At the site map I unmounted the application then deleted the application with the package manager. However it still shows as being installed.

Should I run the drop script manually then grab the new postgres install script from CVS? Once I have the new install script should I run it manually or should the package manager run it. Thanks.

Collapse
15: Re: Jeff's Photo Album (response to 1)
Posted by Tom Mizukami on
Jarko,

I see the modified drop script, but not the create script.

Collapse
16: Re: Jeff's Photo Album (response to 1)
Posted by Jarkko Laine on
Tom,

Jeff had already added the missing \i line to the create script so I didn't have to modify it anymore :)

Collapse
17: Re: Jeff's Photo Album (response to 1)
Posted by Jarkko Laine on
Actually Vinod has now added all the missing changes to contrib, so the package should be fairly solid. (see other thread about it)