Hi, i'm trying to show all data contained by REQUEST, but when i write the next code, the computer overloads and Zope doesn't response: <dtml-in "REQUEST.items()" sort> <dtml-var sequence-key>:<dtml-var sequence-item><BR> </dtml-in> If i use REQUEST.form.items() or REQUEST.cookies.items(), it works perfectly, but there is data in 'Other' that i need. Am i doing something wrong or is a problem of Zope? I'm using Zope 2.3.3, python 1.5.2 and Debian/woody. Thanks. Bye.
Juan Garcia Garcia wrote:
Hi,
i'm trying to show all data contained by REQUEST,
What's wrong with <dtml-var REQUEST> ?
but when i write the next code, the computer overloads and Zope doesn't response:
<dtml-in "REQUEST.items()" sort> <dtml-var sequence-key>:<dtml-var sequence-item><BR> </dtml-in>
I bet you're using IE and REQUEST.items() isn't returning anything ;-) (I don't think REQUEST.items() _should_ work since that might give away secret things like the secuirty context...) That said, maybe it is a bug, anyone else got any comments? Chris
Hi,
What's wrong with <dtml-var REQUEST> ? If i write <dtml-var REQUEST>, i view all data without problems.
I'm going to explain you my purpose: i must put a link, like in www.zope.org, called "Printable page", but the web pages are dynamic (they are generated with the values of variables pass through forms or with REQUEST.set), and to show the page ready for printing i need the values of those variables to make the URL. Bye.
On Tue, Oct 30, 2001 at 11:16:43AM +0100, Juan Garcia Garcia wrote:
I'm going to explain you my purpose: i must put a link, like in www.zope.org, called "Printable page", but the web pages are dynamic (they are generated with the values of variables pass through forms or with REQUEST.set), and to show the page ready for printing i need the values of those variables to make the URL.
Well, one snippet that might help: <a href="<dtml-var URL>?<dtml-if QUERY_STRING><dtml-var QUERY_STRING>&</dtml-if>pp=1">Test link</a> should generate links that append pp=1 as a parameter to whatever page you're on. It does have the disadvantage that if you use that code in your printable page, your users might keep clicking the same link and tacking on extra pp=1 parameters to the end of the URL. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
Juan Garcia Garcia writes:
i'm trying to show all data contained by REQUEST, but when i write the next code, the computer overloads and Zope doesn't response:
<dtml-in "REQUEST.items()" sort> <dtml-var sequence-key>:<dtml-var sequence-item><BR> </dtml-in>
If i use REQUEST.form.items() or REQUEST.cookies.items(), it works perfectly, but there is data in 'Other' that i need. The you can use:
<dtml-in "REQUEST.other.items()"> ... Dieter
On Tue, 30 Oct 2001, Dieter Maurer wrote:
Juan Garcia Garcia writes:
i'm trying to show all data contained by REQUEST, but when i write the next code, the computer overloads and Zope doesn't response:
<dtml-in "REQUEST.items()" sort> <dtml-var sequence-key>:<dtml-var sequence-item><BR> </dtml-in>
If i use REQUEST.form.items() or REQUEST.cookies.items(), it works perfectly, but there is data in 'Other' that i need. The you can use:
<dtml-in "REQUEST.other.items()"> ... I've tried already what you say and i get the same problem. I suppose that REQUEST.items() iterates over the categories 'form', 'cookies', 'other' and 'environ', and when it reaches to 'other' the computer overloads. If i show the whole REQUEST (<dtml-var REQUEST>) i can see the four categories with their keys and values without problem.
Thank you.
Juan Garcia Garcia writes:
<dtml-in "REQUEST.other.items()"> ...
I've tried already what you say and i get the same problem. I suppose that REQUEST.items() iterates over the categories 'form', 'cookies', 'other' and 'environ', and when it reaches to 'other' the computer overloads. There is no reason to overload for "other.items", as it is a normal Python dictionary. I expect the problem to be in the rendering of one of the objects, you get...
Try to only use "sequence-key" inside your dtml-in, not the "sequence-item". If that works (and I am almost sure it will), then we need to find the dangerous element. It might be "PUBLISHED". It is the published object itself, and when you just render it, you get an infinite loop.... Dieter
Hi,
There is no reason to overload for "other.items", as it is a normal Python dictionary. I expect the problem to be in the rendering of one of the objects, you get...
Try to only use "sequence-key" inside your dtml-in, not the "sequence-item". If that works (and I am almost sure it will), then we need to find the dangerous element. It might be "PUBLISHED". It is the published object itself, and when you just render it, you get an infinite loop....
You were right, the element PUBLISHED made an infinite loop. I'm very grateful for your attention and i want to thank you and the others that tried to solve my problem. Thanks. Bye.
participants (4)
-
Chris Withers -
Dieter Maurer -
Juan Garcia Garcia -
Mike Renfro