Forum OpenACS Q&A: modified tcl files not reloading

Collapse
Posted by Michael Pulling on
It is supposedly my job to maintain content on our site, not to
change tcl files, but some genius terminated our contract with the
developers who built our site. I am a less-than-newbie, but I need
help.

A download process from our site requires the user to enter form
information, which is then logged in a Postgres database and email to
our bizdev department. This process is broken somewhere and I am
trying to find out where.

I have edited a tcl file called download-defs.tcl in the tcl
directory, and restarted both the database and the server, but my
edits are not showing up. The file is still as it was before I edited
it. Why are the tcl files not reloading?

THanks!

Collapse
Posted by David Walker on
How did you restart the server?  does ps -AH show more than one set of nsd tasks running?
Collapse
Posted by Michael Pulling on
I use a browser-based tool ("Webmin"?) to monitor the processes that are running on the server, and it tells me that only one version of nsd.tcl is running.

Otherwise the server told me that -H is an illegal option.

I do have multiple version of pgsql running.

Collapse
Posted by S. Y. on
I have edited a tcl file called download-defs.tcl in the tcl directory, and restarted both the database and the server, but my edits are not showing up. The file is still as it was before I edited it.

You probably have a UNIX file ownership/permissions problem. How many times you restart your database or web server isn't going to matter if your edits aren't being saved to the file. You need to copy over/edit the files as the owner or get root access and chown the file to something that'll work. Find your UNIX sysadmin and ask for help.

Collapse
Posted by Michael Pulling on
I had made copies of the tcl files in question before I modified them, and I didn't realize that they were being read when I restarted aolserver. Thus, my changes in the new file were read, and then promptly replaced by the older version of the same file.

Thanks to everyone for their help!

Collapse
Posted by S. Y. on
Yeah, AOLserver looks through the private Tcl directory and reads each one alphabetically. I don't know anything about current versions of OpenACS or Classic ACS, but there used to be preloaded Tcl procs in files labeled like 00-ad-utilities.tcl and maybe zz-postproc.tcl. AOLserver doesn't really care about the name of the Tcl file, but if you have dependencies in your procs, be careful about how their arranged.

To be safe, put the original and/or previously modified versions of your Tcl files in a directory outside (e.g., tcl.orig and tcl.old) that's never sourced by AOLserver.