Forum OpenACS Q&A: Extra code: index.tcl

Collapse
Posted by Bob OConnor on

The login page in my browser IE5 shows the plain text:

*---
Login
Your email address:
Your password:
Remember this address and password? (help)
If you like, you can go directly...
*---

In the status bar of browser it reads: "Done but with errors on the page. " I look at the source and see a whole segment of script code that doesn't execute and is UNNECESSARY. A Sample:

*---begin
(script)
var isIE,isNN; ...
...
(link rel=stylesheet href="/pull-down-menus/style?menu_id=2"
(type="text/css")
(script src="/pull-down-menus/standard.js")
...
var LearnabouttheWeb = new NavBarItem("Learn about the
Web","http://www.arsdigita.com/pages/learn/", true, false);

var LearnaboutArsDigita = new NavBarItem("Learn about
ArsDigita","http://www.arsdigita.com/pages/about", true, false);
...
*---end

Where do I turn off and delete this extra code? I've looked in index.tcl and don't see where/how this code is generated?

-Bob

Collapse
Posted by Roberto Mello on
The 'extra code' is generated by the Pull-down menus module. If it were working on OpenACS, you'd see a Javascript-generated bar on the top of your page. Look at photo.net or cyranoscience.com for a working example.

You turn that off by seeting the appropriate pull-down menu parameter in your /parameters/ad.tcl file.

Collapse
Posted by MaineBob OConnor on
Roberto: The 'extra code' is generated by the Pull-down menus module. If it were working on OpenACS, ...

Bob: I take it it's NOT working in OpenACS??? Not that I want it
now, but shouldn't the default be "off" until it is?

Roberto: You turn that off by setting the appropriate pull-down menu parameter in your /parameters/ad.tcl file.

Bob: Ok, I searched thru ad.tcl and (server1.ini on my system
and couldn't find it.)  I searched on "pull"  "down".  Can
you copy the name of the section and actual setting?

***
Bob: On this system I'm using (upgraded to 3.2.2), set up by my friend Bill, it appears that AolServer is reading from server1.ini because that is where all the changes are.  ad.tcl looks like it's unchanged:  ..."yourdomain Network"...
Yet to restart the server, I've been using Bill's:

/bin/nsd8x -t nsd.tcl -u nsadmin server.log 2 & > 1

This doesn't seem to match the current OpenACS docs or,
the command that runs /admin  restart link at the bottom of the page.

Can you give me a bit more detail about these command lines
and which start up files become active?  I see that it is
probably better to use nsd.tcl instead of xxx.ini.

Thanks -Bob

Collapse
Posted by Roberto Mello on
In my ad.ini (default OpenACS download) it is off by default. Someone must have changed it in your install:

The param is in the "pdm" section, short for Pull Down Menus. The comments could be more explicit. Maybe we'll do that for OpenACS 3.2.4.

[ns/server/yourservername/acs/pdm]
; Flag to display the administration menu bar
MenuOnAdminPagesP=0
; Flag to display the default menu bar on non-/admin pages
MenuOnUserPagesP=0
.tcl config file:
ns_section ns/server/${server}/acs/pdm
        # Flag to display the administration menu bar
        ns_param MenuOnAdminPagesP 0

        # Flag to display the default menu bar on non-/admin pages
        ns_param MenuOnUserPagesP 0

Bob: /bin/nsd8x -t nsd.tcl -u nsadmin server.log 2 & > 1

Did he put the nsd binary and the nsd.tcl under /bin ? I had never seen this... It'll be kinda hard to upgrade later huh ?

If you're restarting the server with "-t nsd.tcl" then the server is reasing nsd.tcl as its config file. The ad.ini or ad.tcl (that should be renamed to yourservicename.ini/.tcl) should be in the parameters/ directory of the OpenACS path and there must be a param in the nsd.tcl explicitly telling it to read the OpenACS config file.

I don't think you can read an ad.ini file having started AOLserver with nsd.tcl (anyone can tell me if this is correct ?), so maybe your ad.tcl file is somewhere else.

Is there a "source /path/to/wherever/ad.tcl" line in your nsd.tcl ?

Collapse
Posted by Bob OConnor on
Thank you Roberto

The /pdm section was causing the problem.  Perhaps bill copied it over from an older OpenACS version.  I'll discuss other points with
Bill.  - Bob