[ZCM] [ZC] 2112/ 4 Comment "zsql-based ZPT put processor in infinite crawling"

"Collector: Zope Bugs, Features, and Patches ..." <[email protected]>
Newsgroups gmane.comp.web.zope.devel.collector-monitor
Message-ID <[email protected]>
Issue #2112 Update (Comment) "zsql-based ZPT put processor in infinite crawling"
 Status Pending, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/2112

==============================================================
= Comment - Entry #4 by slinkp on Nov 17, 2006 12:16 pm

I tested all three examples with ZMySQLDA 2.0.8.
No such problems.

What type does kinterbasedb return for datetime fields?  ZMySQLDA wraps them as zope's DateTime.DateTime.
It looks like kinterbasedb is returning something that A) DateTime can't handle in its __init__, which would be a Zope bug - nothing should make that "infinite crawling";   and B) doesn't have security declarations, so you're not allowed to call its strftime() methdod in restricted code.

________________________________________
= Comment - Entry #3 by mbanaouas on May 18, 2006 3:51 am

I would like to be sure about it.
Can you suggest me a test method ? thanks.

>Comment - Entry #2 by ajung on May 18, 2006 12:21 am
>Are you sure that this issue is not directly related to the DA 
>itself? 
________________________________________
= Comment - Entry #2 by ajung on May 18, 2006 12:21 am

Are you sure that this issue is not directly related to the DA itself?


________________________________________
= Request - Entry #1 by mbanaouas on May 17, 2006 8:51 pm

sql_data is a ZSQL with no parameter ('Select SOME_DATE From SOME_TABLE') returning single row (firebird 1.5, kinterbasedb).

this works well:
<div tal:repeat="result here/sql/sql_data" >
  <span tal:define = "fdate  python:result.SOME_DATE"
  tal:replace="fdate">Date goes here</span>
</div>

but this put processor in infinite crawling
<div tal:repeat="result here/sql/sql_data" >
  <span tal:define = "fdate  python:DateTime(result.SOME_DATE).strftime('%m %d %Y')"
  tal:replace="fdate">Date goes here</span>
</div>

and this shows authentification prompt that if not filled gives this error:
Error Type: Unauthorized
Error Value: You are not allowed to access 'strftime' in this context
<div tal:repeat="result here/sql/sql_data" >
  <span tal:define = "fdate  python:result.SOME_DATE.strftime('%m %d %Y')"
  tal:replace="fdate">Date goes here</span>
</div>

==============================================================
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.