[AOLSERVER] Embed Tcl inside registered ADP tag?
I used to (3.3.1+ad13) be able to call ns_adp_parse -file and have the content of a registered tag passed to the relevant proc verbatim from where I could re-parse it, eg: mytag ... %=some Tcl % ... /mytag could be processed like: proc mytag { string tagset } { return ...[ns_adp_parse $string]... } But in 4.0.10 the registered proc is not called at all because the embedded Tcl is parsed first and the before- and after- chunks are then parsed separately (neither of which call the registered proc). So the above evaluates to something like: mytag ... (result of Tcl) ... /mytag The reason I'm trying to do this is because our help system is based around a registered adp tag help, which wraps the tag body inside a template, where each .adp page looks something like: help title=How to order ... ...HTML ... ...%= [call_some_proc] % ... /help This works in 3.3.1+ad13 (in the sense that the registered proc is called and is able to parse the tag body), but in 4.0.10 the proc is not called at all. I guess I can work around it by not having the whole page body inside the tag, but that means putting more boilerplate in each .adp. Is there a more 4.0.10 friendly way I should be doing this? Cheers, Steve Woodcock -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] Embed Tcl inside registered ADP tag?
Personally, I'd like to see this functionality be configurable. There are two evaluation processes that can happen: * tags * embedded code It would be nice if it were possible to configure the server (maybe even with a page-level, directory tree, or file extension override ability) to say which goes first, or to disable one of the two. For clarity, you could say whether a given server (page/tree/file type) evaluates: * embedded code then tags (as 4.0 works) * tags then embedded code (as 3.5 works) * tags only * embedded code only Rob Seeger Dossy Shiobara wrote on 1/13/2006, 9:37 AM: On 2006.01.13, Steve Woodcock [EMAIL PROTECTED] wrote: I used to (3.3.1+ad13) be able to call ns_adp_parse -file and have the content of a registered tag passed to the relevant proc verbatim from where I could re-parse it, eg: mytag ... %=some Tcl % ... /mytag could be processed like: proc mytag { string tagset } { return ...[ns_adp_parse $string]... } But in 4.0.10 the registered proc is not called at all because the embedded Tcl is parsed first and the before- and after- chunks are then parsed separately (neither of which call the registered proc). So the above evaluates to something like: mytag ... (result of Tcl) ... /mytag Steve, Yes, the order in which tags are parsed was changed between 3.x and 4.0.x, unfortunately. Jeremy Collins filed an RFE to change it back in September 2004, but it hasn't been done yet: http://aolserver.com/sf/rfe/1030577 Jim Davidson tells me he made the change as part of the safe eval thingy he implemented, but it seems lots of people prefer it to behave the old way -- and I don't think it's just for compatibility's sake -- it's more useful the old way. I say we leave it the way it is in 4.0.x, which we're wrapping up, and change it BACK before 4.5.0 is released. If anyone has a good reason why it shouldn't be, please speak up now -- thanks! -- Dossy -- Dossy Shiobara | [EMAIL PROTECTED] | http://dossy.org/ Panoptic Computer Network | http://panoptic.com/ He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on. (p. 70) -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] Embed Tcl inside registered ADP tag?
On 1/13/06, Dossy Shiobara [EMAIL PROTECTED] wrote: Yes, the order in which tags are parsed was changed between 3.x and 4.0.x, unfortunately. Jeremy Collins filed an RFE to change it back in September 2004, but it hasn't been done yet: http://aolserver.com/sf/rfe/1030577 Oh I missed that, thanks. Jim Davidson tells me he made the change as part of the safe eval thingy he implemented, but it seems lots of people prefer it to behave the old way -- and I don't think it's just for compatibility's sake -- it's more useful the old way. I say we leave it the way it is in 4.0.x, which we're wrapping up, and change it BACK before 4.5.0 is released. If anyone has a good reason why it shouldn't be, please speak up now -- thanks! Makes sense; is there an ETA for 4.5.0? Cheers, Steve -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] Embed Tcl inside registered ADP tag?
At Friday 06:37 AM 1/13/2006, Dossy Shiobara wrote: Yes, the order in which tags are parsed was changed between 3.x and 4.0.x, unfortunately. Jeremy Collins filed an RFE to change it back in September 2004, but it hasn't been done yet: There was further discussion of this issue on the AOLSERVER list in August of 2005 as well, and Alastair Young (also with Arena Solutions) posted a patch that restores the AOLserver 3.x tag precedence: http://www.mail-archive.com/aolserver@listserv.aol.com/msg09219.html We're using this patch now as we attempt to replace AOLserver 3.x with 4.x, and it seems to work. I say we leave it the way it is in 4.0.x, which we're wrapping up, and change it BACK before 4.5.0 is released. If anyone has a good reason why it shouldn't be, please speak up now -- thanks! If you mean any reason it shouldn't be delayed until 4.5.0, we'd prefer to see it in 4.0.x, since that's the release we're using and we'd like to be able to replace the above patch with something that's supported. Since you mentioned 4.5.0: is the new Tcl-based build system going to be mandatory in that version, or will it still be possible to build AOLserver 4.5.0 in the current way (the standard ./configure, make, make install way, that is)? - John -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] aolserver bug
You could try my patch; I'm pretty sure it won't have any ill effects (perhaps marginally more cpu use due to a few extra times through the driver loop) but that's hardly any worse than your occasional lockups. Another thing to look at is is you can get a core dump (kill -QUIT) or debugger attached; in my case the driver thread was sitting in poll() and all the connection threads were waiting inside pthread_wait_cond/Ns_CondTimedWait (so of course my first suspicion was a mutex deadlock, but that doesn't seem possible with the structure of the code). -J -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.