The Toolkit for Online Communities
17104 Community Members, 2 members online, 2215 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : "fancy" adp parser weirdness with AOLServer 3.3ad13 ?

Forum OpenACS Q&A: "fancy" adp parser weirdness with AOLServer 3.3ad13 ?

Icon of envelope Request notifications

Was there a change in AOLServer support for the "fancy" adp parser from v3.2 to v3.3? I've got a site that uses custom tags (registered via ad_register_styletag) that works fine served by a v3.2 server, but fails on the v3.3ad13 server I've been setting up for virtual hosting.

I've confirmed that the nsd.config file is correct (and unchanged):

# ADP custom parsers -- see adp.c
ns_section "ns/server/${servername}/adp/parsers"
ns_param   adp    ".adp" ;# The simple parser looks for <%... %>
ns_param   fancy  ".adp" ;# The fancy parser does a lot more.

Looking through the Makefile I don't see any configs that needed to be set during compilation, nor is there any mention of this in the docs at AOLServer.com.

Further, looking at /doc/styles.tcl on this new box, I see that all my styletags registered during startup. They just don't work. However, their equivalent (using the <% [some_proc] %> syntax) works just fine.

I'm not opposed to tromping through all my templates and editing out the custom tags for the other syntax substitute, though I'd prefer not to. What I'm most concerned to know is whether this is actually a sign of a larger (and possibly more difficult) problem.

Anyone else run into this? I don't see anything in the archives. TIA!

Doh. The config section I was using in fact wasn't correct, but once I fixed it, the styletags once again work.

First, for no particularly good reason, I commented out the

ns_param adp ".adp" 
line just to see what would happen. The styletags worked.

However, this seemed bizarre so I looked again at the relevant section in the canonical reference at AOLServer.com (http://aolserver.com/docs/admin/config-reference.tcl.txt) where both ns_params in this section are indeed included, neither one commented out.

And then I noticed that the order I listed them in my config file was reversed from the order they list--and in fact was reversed from what I posted above (must have copied&pasted that from the reference and not from my actual nsd file). Switching them and leaving them both enabled results in a correctly performing system.

So, the correct section is as above:

# ADP custom parsers -- see adp.c
ns_section "ns/server/${servername}/adp/parsers"
ns_param adp   ".adp"   ;# The simple parser looks for <% ... %>
ns_param fancy ".adp"   ;# The fancy parser does a lot more.

Seems like perhaps there should be a big fat warning in AOLServer's reference "Don't switch the order of these params!!" One wouldn't presume that it would make a difference, and one careless slip while editing can induce a long bout of head-scratching. Well, the scabs will heal.