Here was a fun error I had. Try and figure out where the bug is! I had this dtml-code: <dtml-if getEasyLanguageService> <dtml-let ELS="getEasyLanguageService"> <dtml-in getAllLanguages> <dtml-var "ELS.getLanguageByRFC3066(_['sequence-item'])" html_quote> </dtml-in> </dtml-let> </dtml-if> This worked fine. I then changed it to this: <dtml-if "is_language_aware() and getEasyLanguageService()"> <dtml-let ELS="getEasyLanguageService"> <dtml-in getAllLanguages> <dtml-var "ELS.getLanguageByRFC3066(_['sequence-item'])" html_quote> </dtml-in> </dtml-let> </dtml-if> Now this fails, and it fails in: <dtml-var "ELS.getLanguageByRFC3066(_['sequence-item'])" html_quote> with an "function attributes not accessible in restricted mode" error! Now, where is the bug? :-) First answers get 5 ZopeZen coolness credit points. An explanation to why the first version works gets 100 points! :-) Best Regards Lennart Regebro, Torped http://www.easypublisher.com/
This is actually well documented by Dieter, see the second Note of http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html#c37ac15c14b4b... Florent In article <000701c27464$06aabe80$250aa8c0@vast.torped.se> you write:
Here was a fun error I had. Try and figure out where the bug is!
I had this dtml-code:
<dtml-if getEasyLanguageService> <dtml-let ELS="getEasyLanguageService"> <dtml-in getAllLanguages> <dtml-var "ELS.getLanguageByRFC3066(_['sequence-item'])" html_quote> </dtml-in> </dtml-let> </dtml-if>
This worked fine. I then changed it to this:
<dtml-if "is_language_aware() and getEasyLanguageService()"> <dtml-let ELS="getEasyLanguageService"> <dtml-in getAllLanguages> <dtml-var "ELS.getLanguageByRFC3066(_['sequence-item'])" html_quote> </dtml-in> </dtml-let> </dtml-if>
-- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com
participants (2)
-
Florent Guillaume -
Lennart Regebro