[Repoze-dev] [issue29] Editing a resource to have an empty path causes error
David Durham
bugs at bugs.repoze.org
Mon Mar 24 11:06:35 EDT 2008
New submission from David Durham <david.durham.jr at gmail.com>:
I have a javascript resouce that I'd like to remove (from the portal_javascripts
tool). I tried the "remove" action, the red x, but nothing happened, then I
tried changing the path to empty and save, which worked but now the
portal_javascripts tool throws an error.
CompilerError Python 2.4.5: /var/www/jgsi_beta/bin/python2.4
Mon Mar 24 10:02:16 2008
A problem occurred in a Python script. Here is the sequence of function calls
leading up to the error, in the order they occurred.
/var/www/jgsi_beta/lib/python2.4/site-packages/Paste-1.5-py2.4.egg/paste/cgitb_catcher.py in __call__(self=<paste.cgitb_catcher.CgitbMiddleware object>, environ={'CHANNEL_CREATION_TIME': '1206370927.59', 'CONNECTION_TYPE': 'keep-alive', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE': 'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw"; __ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080', 'HTTP_KEEP_ALIVE': '300', ...}, start_response=<function start_response>)
41 def __call__(self, environ, start_response):
42 try:
43 app_iter = self.app(environ, start_response)
44 return self.catching_iter(app_iter, environ)
45 except:
app_iter undefined, self = <paste.cgitb_catcher.CgitbMiddleware object>,
self.app = <paste.httpexceptions.HTTPExceptionHandler object>, environ =
{'CHANNEL_CREATION_TIME': '1206370927.59', 'CONNECTION_TYPE': 'keep-alive',
'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE':
'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw";
__ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080',
'HTTP_KEEP_ALIVE': '300', ...}, start_response = <function start_response>
/var/www/jgsi_beta/lib/python2.4/site-packages/Paste-1.5-py2.4.egg/paste/httpexceptions.py in __call__(self=<paste.httpexceptions.HTTPExceptionHandler object>, environ={'CHANNEL_CREATION_TIME': '1206370927.59', 'CONNECTION_TYPE': 'keep-alive', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE': 'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw"; __ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080', 'HTTP_KEEP_ALIVE': '300', ...}, start_response=<function start_response>)
630 []).append(HTTPException)
631 try:
632 return self.application(environ, start_response)
633 except HTTPException, exc:
634 return exc(environ, start_response)
self = <paste.httpexceptions.HTTPExceptionHandler object>, self.application =
<repoze.retry.Retry instance>, environ = {'CHANNEL_CREATION_TIME':
'1206370927.59', 'CONNECTION_TYPE': 'keep-alive', 'GATEWAY_INTERFACE':
'CGI/1.1', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE':
'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw";
__ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080',
'HTTP_KEEP_ALIVE': '300', ...}, start_response = <function start_response>
/var/www/jgsi_beta/lib/python2.4/site-packages/repoze.retry-0.6-py2.4.egg/repoze/retry/__init__.py in __call__(self=<repoze.retry.Retry instance>, environ={'CHANNEL_CREATION_TIME': '1206370927.59', 'CONNECTION_TYPE': 'keep-alive', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE': 'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw"; __ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080', 'HTTP_KEEP_ALIVE': '300', ...}, start_response=<function start_response>)
24 while 1:
25 try:
26 result = self.application(environ, self.buffer_start_response)
27 except ConflictError, why:
28 if environ.get('wsgi.errors'):
result undefined, self = <repoze.retry.Retry instance>, self.application =
<repoze.tm.TM instance>, environ = {'CHANNEL_CREATION_TIME': '1206370927.59',
'CONNECTION_TYPE': 'keep-alive', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE':
'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw";
__ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080',
'HTTP_KEEP_ALIVE': '300', ...}, self.buffer_start_response = <bound method
Retry.buffer_start_response of <repoze.retry.Retry instance>>
/var/www/jgsi_beta/lib/python2.4/site-packages/repoze.tm-0.8-py2.4.egg/repoze/tm/__init__.py in __call__(self=<repoze.tm.TM instance>, environ={'CHANNEL_CREATION_TIME': '1206370927.59', 'CONNECTION_TYPE': 'keep-alive', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE': 'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw"; __ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080', 'HTTP_KEEP_ALIVE': '300', ...}, start_response=<bound method Retry.buffer_start_response of <repoze.retry.Retry instance>>)
12 transaction.begin()
13 try:
14 result = self.application(environ, start_response)
15 except:
16 self.abort()
result undefined, self = <repoze.tm.TM instance>, self.application =
<repoze.vhm.middleware.VHMFilter instance>, environ = {'CHANNEL_CREATION_TIME':
'1206370927.59', 'CONNECTION_TYPE': 'keep-alive', 'GATEWAY_INTERFACE':
'CGI/1.1', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE':
'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw";
__ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080',
'HTTP_KEEP_ALIVE': '300', ...}, start_response = <bound method
Retry.buffer_start_response of <repoze.retry.Retry instance>>
/var/www/jgsi_beta/lib/python2.4/site-packages/repoze.vhm-0.5-py2.4.egg/repoze/vhm/middleware.py in __call__(self=<repoze.vhm.middleware.VHMFilter instance>, environ={'CHANNEL_CREATION_TIME': '1206370927.59', 'CONNECTION_TYPE': 'keep-alive', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE': 'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw"; __ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080', 'HTTP_KEEP_ALIVE': '300', ...}, start_response=<bound method Retry.buffer_start_response of <repoze.retry.Retry instance>>)
51 environ['repoze.vhm.virtual_root'] = root_header
52
53 return self.application(environ, start_response)
54
55 def make_filter(app, global_conf):
self = <repoze.vhm.middleware.VHMFilter instance>, self.application =
<repoze.errorlog.ErrorLog instance>, environ = {'CHANNEL_CREATION_TIME':
'1206370927.59', 'CONNECTION_TYPE': 'keep-alive', 'GATEWAY_INTERFACE':
'CGI/1.1', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE':
'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw";
__ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080',
'HTTP_KEEP_ALIVE': '300', ...}, start_response = <bound method
Retry.buffer_start_response of <repoze.retry.Retry instance>>
/var/www/jgsi_beta/lib/python2.4/site-packages/repoze.errorlog-0.5-py2.4.egg/repoze/errorlog/__init__.py in __call__(self=<repoze.errorlog.ErrorLog instance>, environ={'CHANNEL_CREATION_TIME': '1206370927.59', 'CONNECTION_TYPE': 'keep-alive', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE': 'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw"; __ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080', 'HTTP_KEEP_ALIVE': '300', ...}, start_response=<bound method Retry.buffer_start_response of <repoze.retry.Retry instance>>)
83 environ['repoze.errorlog.entryid'] = identifier
84 try:
85 return self.application(environ, start_response)
86 except self.ignored_exceptions:
87 # just reraise an ignored exception
self = <repoze.errorlog.ErrorLog instance>, self.application =
<repoze.obob.publisher.ObobPublisher instance>, environ =
{'CHANNEL_CREATION_TIME': '1206370927.59', 'CONNECTION_TYPE': 'keep-alive',
'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE':
'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw";
__ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080',
'HTTP_KEEP_ALIVE': '300', ...}, start_response = <bound method
Retry.buffer_start_response of <repoze.retry.Retry instance>>
/var/www/jgsi_beta/lib/python2.4/site-packages/repoze.obob-0.2-py2.4.egg/repoze/obob/publisher.py in __call__(self=<repoze.obob.publisher.ObobPublisher instance>, environ={'CHANNEL_CREATION_TIME': '1206370927.59', 'CONNECTION_TYPE': 'keep-alive', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_COOKIE': 'tree-s="eJzTyCkw5NLIKTDiClZ3hALXpHRbda4CY67ERD0Ahn0IGw"; __ac="NjE2NDZkNjk2ZTo2MTY0NmQ2OTZl"', 'HTTP_HOST': 'localhost:8080', 'HTTP_KEEP_ALIVE': '300', ...}, start_response=<bound method Retry.buffer_start_response of <repoze.retry.Retry instance>>)
155
156 helper.before_invoke(published)
157 result = helper.invoke(published)
158
159 status, headers, body_iter = helper.map_result(result)
result undefined, helper = <repoze.zope2.z2bob.Zope2ObobHelper instance>,
helper.invoke = <bound method Zope2ObobHelper.invoke of
<repoze.zope2.z2bob.Zope2ObobHelper instance>>, published = <PageTemplateFile at
/jgsi/portal_javascripts/jsconfig>
/var/www/jgsi_beta/lib/python2.4/site-packages/repoze.zope2-0.3.3-py2.4.egg/repoze/zope2/z2bob.py in invoke(self=<repoze.zope2.z2bob.Zope2ObobHelper instance>, published=<PageTemplateFile at /jgsi/portal_javascripts/jsconfig>)
359 handle_class = dont_publish_class,
360 context = request,
361 bind=1)
362
363 except Redirect, what:
bind undefined
/var/www/jgsi_beta/lib/python2.4/site-packages/repoze.zope2-0.3.3-py2.4.egg/repoze/zope2/mapply.py in mapply(object=<PageTemplateFile at /jgsi/portal_javascripts/jsconfig>, positional=(), keyword=<HTTPRequest, URL=None>, debug=None, maybe=1, missing_name=<function missing_name>, handle_class=<function dont_publish_class>, context=<HTTPRequest, URL=None>, bind=1)
92 args.append(v)
93
94 args=tuple(args)
95 if debug is not None: return debug(object,args,context)
96 else: return object(*args)
object = <PageTemplateFile at /jgsi/portal_javascripts/jsconfig>, args = ()
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/Shared/DC/Scripts/Bindings.py in __call__(self=<PageTemplateFile at /jgsi/portal_javascripts/jsconfig>, *args=(), **kw={'args': ()})
311 def __call__(self, *args, **kw):
312 '''Calls the script.'''
313 return self._bindAndExec(args, kw, None)
314
315 def __render_with_namespace__(self, namespace):
self = <PageTemplateFile at /jgsi/portal_javascripts/jsconfig>,
self._bindAndExec = <bound method PageTemplateFile._bindAndExec of
<...mplateFile at /jgsi/portal_javascripts/jsconfig>>, args = (), kw = {'args':
()}, builtin None = None
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/Shared/DC/Scripts/Bindings.py in _bindAndExec(self=<PageTemplateFile at /jgsi/portal_javascripts/jsconfig>, args=(), kw={'args': ()}, caller_namespace=None)
348 exec bindcode
349 bound_data = bound_data[0]
350 return self._exec(bound_data, args, kw)
351 finally:
352 security.removeContext(self)
self = <PageTemplateFile at /jgsi/portal_javascripts/jsconfig>, self._exec =
<bound method PageTemplateFile._exec of <PageTemplateFile at
/jgsi/portal_javascripts/jsconfig>>, bound_data = {'options': {'args': ()},
'user': <PropertiedUser 'admin'>}, args = (), kw = {'args': ()}
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/Products/PageTemplates/PageTemplateFile.py in _exec(self=<PageTemplateFile at /jgsi/portal_javascripts/jsconfig>, bound_names={'options': {'args': ()}, 'user': <PropertiedUser 'admin'>}, args=(), kw={'args': ()})
127 context = self.pt_getContext()
128 context.update(bound_names)
129 return self.pt_render(extra_context=bound_names)
130 finally:
131 security.removeContext(self)
self = <PageTemplateFile at /jgsi/portal_javascripts/jsconfig>, self.pt_render =
<bound method PageTemplateFile.pt_render of <PageTemplateFile at
/jgsi/portal_javascripts/jsconfig>>, extra_context undefined, bound_names =
{'options': {'args': ()}, 'user': <PropertiedUser 'admin'>}
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/Products/PageTemplates/PageTemplate.py in pt_render(self=<PageTemplateFile at /jgsi/portal_javascripts/jsconfig>, source=False, extra_context={'options': {'args': ()}, 'user': <PropertiedUser 'admin'>})
87 c = self.pt_getContext()
88 c.update(extra_context)
89 return super(PageTemplate, self).pt_render(c, source=source)
90
91 def pt_errors(self, namespace={}):
builtin super = <type 'super'>, global PageTemplate = <class
'Products.PageTemplates.PageTemplate.PageTemplate'>, self = <PageTemplateFile at
/jgsi/portal_javascripts/jsconfig>, ).pt_render = <bound method
PageTemplateFile.pt_render of <PageTemplateFile at
/jgsi/portal_javascripts/jsconfig>>, c = {'container': <JSRegistryTool at
/jgsi/portal_javascripts>, 'context': <JSRegistryTool at
/jgsi/portal_javascripts>, 'default': <object object>, 'here': <JSRegistryTool
at /jgsi/portal_javascripts>, 'loop': {'script':
<Products.PageTemplates.Expressions.PathIterator object>}, 'modules':
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance>, 'nothing':
None, 'options': {'args': ()}, 'repeat':
<Products.PageTemplates.Expressions.SafeMapping object>, 'request':
<HTTPRequest, URL=None>, ...}, source = False
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/pagetemplate/pagetemplate.py in pt_render(self=<PageTemplateFile at /jgsi/portal_javascripts/jsconfig>, namespace={'container': <JSRegistryTool at /jgsi/portal_javascripts>, 'context': <JSRegistryTool at /jgsi/portal_javascripts>, 'default': <object object>, 'here': <JSRegistryTool at /jgsi/portal_javascripts>, 'loop': {'script': <Products.PageTemplates.Expressions.PathIterator object>}, 'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance>, 'nothing': None, 'options': {'args': ()}, 'repeat': <Products.PageTemplates.Expressions.SafeMapping object>, 'request': <HTTPRequest, URL=None>, ...}, source=False, sourceAnnotations=False, showtal=False)
115 TALInterpreter(self._v_program, self._v_macros,
116 context, output, tal=not source, showtal=showtal,
117 strictinsert=0, sourceAnnotations=sourceAnnotations)()
118 return output.getvalue()
119
strictinsert undefined, sourceAnnotations = False
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tal/talinterpreter.py in __call__(self=<zope.tal.talinterpreter.TALInterpreter object>)
269 assert self.scopeLevel == 0
270 assert self.i18nContext.parent is None
271 self.interpret(self.program)
272 assert self.level == 0
273 assert self.scopeLevel == 0
self = <zope.tal.talinterpreter.TALInterpreter object>, self.interpret = <bound
method TALInterpreter.interpret of <zope.tal.talinterpreter.TALInterpreter
object>>, self.program = [('version', '1.6'), ('mode', 'html'),
('setSourceFile', 'manage_jsForm'), ('setPosition', (1, 0)), ('beginScope',
{'tal:replace': 'structure here/manage_page_header'}), ('optTag', ('div', '',
None, 1, [('startEndTag', ('div', [...]))], [('insertStructure', (<PathExpr
standard:'here/manage_page_header'>, {}, []))])), ('rawtextBeginScope',
('\n\n<script type="text/javascript">\nfunction getSo...e7b;\n border: 1px solid
#ffa500;\n}\n\n</style>\n\n', 0, (149, 0), 1, {'tal:replace': 'structure
here/manage_tabs'})), ('optTag', ('div', '', None, 1, [('startEndTag', ('div',
[...]))], [('insertStructure', (<PathExpr standard:'here/manage_tabs'>, {},
[]))])), ('rawtextBeginScope', ('\n\n', 0, (151, 0), 1, {'action':
'manage_saveScripts', 'method': 'post', 'tal:attributes': "action
python:here.absolute_url()+'/manage_saveScripts'"})), ('startTag', ('form',
[('action', 'manage_saveScripts', 'replace', <PythonExpr
here.absolute_url()+'/manage_saveScripts'>, False, None), ('tal:attributes',
"action python:here.absolute_url()+'/manage_saveScripts'", 'tal'), ('method',
'method="post"')])), ('rawtextBeginScope', ('\n\n <p>\n ', 8, (156, 8), 0,
{'name': 'debugmode:boolean', 'tal:attributes': 'checked here/getDebugMode',
'type': 'checkbox'})), ('startEndTag', ('input', [('type', 'type="checkbox"'),
('name', 'name="debugmode:boolean"'), ('tal:attributes', 'checked
here/getDebugMode', 'tal'), ('checked', None, 'insert', <PathExpr
standard:'here/getDebugMode'>, False, None)])), ('rawtextBeginScope', ('\n
<label for="debugmode" id="debugmodelab...e affects performance. \n </p>\n <p>\n
', 8, (162, 8), 1, {'id': 'autogroupingmode', 'name':
'autogroupingmode:boolean', 'tal:attributes': 'checked
here/getAutoGroupingMode', 'type': 'checkbox'})), ('startEndTag', ('input',
[('type', 'type="checkbox"'), ('id', 'id="autogroupingmode"'), ('name',
'name="autogroupingmode:boolean"'), ('tal:attributes', 'checked
here/getAutoGroupingMode', 'tal'), ('checked', None, 'insert', <PathExpr
standard:'here/getAutoGroupingMode'>, False, None)])), ('rawtextBeginScope',
('\n <label for="autogroupingmode" id="autog...on their position in the
registry.\n </p>\n\n ', 4, (168, 4), 1, {'i18n:attributes': 'value', 'style':
'float: none;', 'type': 'submit', 'value': 'Save'})), ('startEndTag', ('input',
[('type', 'type="submit"'), ('i18n:attributes', 'value', 'i18n'), ('value',
'Save', 'replace', None, 1, None), ('style', 'style="float: none;"')])),
('rawtextBeginScope', ('\n\n <p>The order of the scripts in this form i...p/down
arrows to change the rendering order.</p>\n', 0, (174, 4), 1, {'tal:define':
'portal python:here.portal_url.getPortalObject();', 'tal:repeat': 'script
here/getResources'})), ('setLocal', ('portal', <PythonExpr
here.portal_url.getPortalObject()>)), ('loop', ('script', <PathExpr
standard:'here/getResources'>, [('rawtextColumn', ('\n ', 4)), ('optTag',
('tal:scripts', None, 'tal', 0, [...], [...]))])), ('rawtextBeginScope', ('\n\n
', 4, (246, 4), 1, {'i18n:attributes': 'value', 'type': 'submit', 'value':
'Save'})), ...]
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tal/talinterpreter.py in interpret(self=<zope.tal.talinterpreter.TALInterpreter object>, program=[('version', '1.6'), ('mode', 'html'), ('setSourceFile', 'manage_jsForm'), ('setPosition', (1, 0)), ('beginScope', {'tal:replace': 'structure here/manage_page_header'}), ('optTag', ('div', '', None, 1, [('startEndTag', ('div', [...]))], [('insertStructure', (<PathExpr standard:'here/manage_page_header'>, {}, []))])), ('rawtextBeginScope', ('\n\n<script type="text/javascript">\nfunction getSo...e7b;\n border: 1px solid #ffa500;\n}\n\n</style>\n\n', 0, (149, 0), 1, {'tal:replace': 'structure here/manage_tabs'})), ('optTag', ('div', '', None, 1, [('startEndTag', ('div', [...]))], [('insertStructure', (<PathExpr standard:'here/manage_tabs'>, {}, []))])), ('rawtextBeginScope', ('\n\n', 0, (151, 0), 1, {'action': 'manage_saveScripts', 'method': 'post', 'tal:attributes': "action python:here.absolute_url()+'/manage_saveScripts'"})), ('startTag', ('form', [('action', 'manage_saveScripts', 'replace', <PythonExpr here.absolute_url()+'/manage_saveScripts'>, False, None), ('tal:attributes', "action python:here.absolute_url()+'/manage_saveScripts'", 'tal'), ('method', 'method="post"')])), ('rawtextBeginScope', ('\n\n <p>\n ', 8, (156, 8), 0, {'name': 'debugmode:boolean', 'tal:attributes': 'checked here/getDebugMode', 'type': 'checkbox'})), ('startEndTag', ('input', [('type', 'type="checkbox"'), ('name', 'name="debugmode:boolean"'), ('tal:attributes', 'checked here/getDebugMode', 'tal'), ('checked', None, 'insert', <PathExpr standard:'here/getDebugMode'>, False, None)])), ('rawtextBeginScope', ('\n <label for="debugmode" id="debugmodelab...e affects performance. \n </p>\n <p>\n ', 8, (162, 8), 1, {'id': 'autogroupingmode', 'name': 'autogroupingmode:boolean', 'tal:attributes': 'checked here/getAutoGroupingMode', 'type': 'checkbox'})), ('startEndTag', ('input', [('type', 'type="checkbox"'), ('id', 'id="autogroupingmode"'), ('name', 'name="autogroupingmode:boolean"'), ('tal:attributes', 'checked here/getAutoGroupingMode', 'tal'), ('checked', None, 'insert', <PathExpr standard:'here/getAutoGroupingMode'>, False, None)])), ('rawtextBeginScope', ('\n <label for="autogroupingmode" id="autog...on their position in the registry.\n </p>\n\n ', 4, (168, 4), 1, {'i18n:attributes': 'value', 'style': 'float: none;', 'type': 'submit', 'value': 'Save'})), ('startEndTag', ('input', [('type', 'type="submit"'), ('i18n:attributes', 'value', 'i18n'), ('value', 'Save', 'replace', None, 1, None), ('style', 'style="float: none;"')])), ('rawtextBeginScope', ('\n\n <p>The order of the scripts in this form i...p/down arrows to change the rendering order.</p>\n', 0, (174, 4), 1, {'tal:define': 'portal python:here.portal_url.getPortalObject();', 'tal:repeat': 'script here/getResources'})), ('setLocal', ('portal', <PythonExpr here.portal_url.getPortalObject()>)), ('loop', ('script', <PathExpr standard:'here/getResources'>, [('rawtextColumn', ('\n ', 4)), ('optTag', ('tal:scripts', None, 'tal', 0, [...], [...]))])), ('rawtextBeginScope', ('\n\n ', 4, (246, 4), 1, {'i18n:attributes': 'value', 'type': 'submit', 'value': 'Save'})), ...])
344 else:
345 for (opcode, args) in program:
346 handlers[opcode](self, args)
347 finally:
348 self.level = oldlevel
handlers = {'<attrAction>': <function attrAction_tal>, 'beginI18nContext':
<function do_beginI18nContext>, 'beginScope': <function do_beginScope_tal>,
'condition': <function do_condition>, 'defineMacro': <function do_defineMacro>,
'defineSlot': <function do_defineSlot>, 'endI18nContext': <function
do_endI18nContext>, 'endScope': <function do_endScope>, 'evaluateCode':
<function do_evaluateCode>, 'extendMacro': <function do_extendMacro>, ...},
opcode = 'loop', self = <zope.tal.talinterpreter.TALInterpreter object>, args =
('script', <PathExpr standard:'here/getResources'>, [('rawtextColumn', ('\n ',
4)), ('optTag', ('tal:scripts', None, 'tal', 0, [('startTag', (...))],
[('rawtextBeginScope', (...)), ('setLocal', (...)), ('startTag', (...)),
('rawtextBeginScope', (...)), ('startEndTag', (...)), ('rawtextBeginScope',
(...)), ('startEndTag', (...)), ('rawtextBeginScope', (...)), ('startEndTag',
(...)), ('rawtextBeginScope', (...)), ('startTag', (...)), ('rawtextBeginScope',
(...)), ('startTag', (...)), ('rawtextBeginScope', (...)), ('startTag', (...)),
('rawtextBeginScope', (...)), ('condition', (...)), ('rawtextBeginScope',
(...)), ('startEndTag', (...)), ('rawtextBeginScope', (...)), ...]))])
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tal/talinterpreter.py in do_loop_tal(self=<zope.tal.talinterpreter.TALInterpreter object>, (name='script', expr=<PathExpr standard:'here/getResources'>, block=[('rawtextColumn', ('\n ', 4)), ('optTag', ('tal:scripts', None, 'tal', 0, [('startTag', ('tal:scripts', [...]))], [('rawtextBeginScope', ('\n ', 6, (...), 0, {...})), ('setLocal', ('resourceExists', <PythonExpr path('exists:portal/%s' % script.getId())>)), ('startTag', ('fieldset', [...])), ('rawtextBeginScope', ('\n\n ', 8, (...), 0, {...})), ('startEndTag', ('input', [...])), ('rawtextBeginScope', ('\n\n <legend>\n <label class="hiddenLabel">Enabled?</label>\n ', 12, (...), 1, {...})), ('startEndTag', ('input', [...])), ('rawtextBeginScope', ('\n <input type="hidden" name="scripts....s:boolean:default" value="False" />\n\n ', 12, (...), 1, {...})), ('startEndTag', ('input', [...])), ('rawtextBeginScope', ('\n\n ', 12, (...), 1, {...})), ('startTag', ('a', [...])), ('rawtextBeginScope', ('\n ↑\n </a>\n ', 12, (...), 1, {...})), ('startTag', ('a', [...])), ('rawtextBeginScope', ('\n ↓\n </a>\n ', 12, (...), 1, {...})), ('startTag', ('a', [...])), ('rawtextBeginScope', ('\n x\n </a>\n ', 12, (...), 1, {...})), ('condition', (<NotExpr 'resourceExists'>, [...])), ('rawtextBeginScope', ('\n </legend>\n\n <div class="scriptfo... <label>Condition</label>\n ', 12, (...), 1, {...})), ('startEndTag', ('input', [...])), ('rawtextBeginScope', ('\n\n <label>Compression type</label>\n ... <select name="scripts.compression:records">', 55, (...), 1, {...})), ...]))]))
822 iterator = self.engine.setRepeat(name, expr)
823 while iterator.next():
824 self.interpret(block)
825 bytecode_handlers["loop"] = do_loop
826
self = <zope.tal.talinterpreter.TALInterpreter object>, self.interpret = <bound
method TALInterpreter.interpret of <zope.tal.talinterpreter.TALInterpreter
object>>, block = [('rawtextColumn', ('\n ', 4)), ('optTag', ('tal:scripts',
None, 'tal', 0, [('startTag', ('tal:scripts', [...]))], [('rawtextBeginScope',
('\n ', 6, (...), 0, {...})), ('setLocal', ('resourceExists', <PythonExpr
path('exists:portal/%s' % script.getId())>)), ('startTag', ('fieldset', [...])),
('rawtextBeginScope', ('\n\n ', 8, (...), 0, {...})), ('startEndTag', ('input',
[...])), ('rawtextBeginScope', ('\n\n <legend>\n <label
class="hiddenLabel">Enabled?</label>\n ', 12, (...), 1, {...})), ('startEndTag',
('input', [...])), ('rawtextBeginScope', ('\n <input type="hidden"
name="scripts....s:boolean:default" value="False" />\n\n ', 12, (...), 1,
{...})), ('startEndTag', ('input', [...])), ('rawtextBeginScope', ('\n\n ', 12,
(...), 1, {...})), ('startTag', ('a', [...])), ('rawtextBeginScope', ('\n
↑\n </a>\n ', 12, (...), 1, {...})), ('startTag', ('a', [...])),
('rawtextBeginScope', ('\n ↓\n </a>\n ', 12, (...), 1, {...})),
('startTag', ('a', [...])), ('rawtextBeginScope', ('\n x\n </a>\n ', 12, (...),
1, {...})), ('condition', (<NotExpr 'resourceExists'>, [...])),
('rawtextBeginScope', ('\n </legend>\n\n <div class="scriptfo...
<label>Condition</label>\n ', 12, (...), 1, {...})), ('startEndTag', ('input',
[...])), ('rawtextBeginScope', ('\n\n <label>Compression type</label>\n ...
<select name="scripts.compression:records">', 55, (...), 1, {...})), ...]))]
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tal/talinterpreter.py in interpret(self=<zope.tal.talinterpreter.TALInterpreter object>, program=[('rawtextColumn', ('\n ', 4)), ('optTag', ('tal:scripts', None, 'tal', 0, [('startTag', ('tal:scripts', [...]))], [('rawtextBeginScope', ('\n ', 6, (...), 0, {...})), ('setLocal', ('resourceExists', <PythonExpr path('exists:portal/%s' % script.getId())>)), ('startTag', ('fieldset', [...])), ('rawtextBeginScope', ('\n\n ', 8, (...), 0, {...})), ('startEndTag', ('input', [...])), ('rawtextBeginScope', ('\n\n <legend>\n <label class="hiddenLabel">Enabled?</label>\n ', 12, (...), 1, {...})), ('startEndTag', ('input', [...])), ('rawtextBeginScope', ('\n <input type="hidden" name="scripts....s:boolean:default" value="False" />\n\n ', 12, (...), 1, {...})), ('startEndTag', ('input', [...])), ('rawtextBeginScope', ('\n\n ', 12, (...), 1, {...})), ('startTag', ('a', [...])), ('rawtextBeginScope', ('\n ↑\n </a>\n ', 12, (...), 1, {...})), ('startTag', ('a', [...])), ('rawtextBeginScope', ('\n ↓\n </a>\n ', 12, (...), 1, {...})), ('startTag', ('a', [...])), ('rawtextBeginScope', ('\n x\n </a>\n ', 12, (...), 1, {...})), ('condition', (<NotExpr 'resourceExists'>, [...])), ('rawtextBeginScope', ('\n </legend>\n\n <div class="scriptfo... <label>Condition</label>\n ', 12, (...), 1, {...})), ('startEndTag', ('input', [...])), ('rawtextBeginScope', ('\n\n <label>Compression type</label>\n ... <select name="scripts.compression:records">', 55, (...), 1, {...})), ...]))])
344 else:
345 for (opcode, args) in program:
346 handlers[opcode](self, args)
347 finally:
348 self.level = oldlevel
handlers = {'<attrAction>': <function attrAction_tal>, 'beginI18nContext':
<function do_beginI18nContext>, 'beginScope': <function do_beginScope_tal>,
'condition': <function do_condition>, 'defineMacro': <function do_defineMacro>,
'defineSlot': <function do_defineSlot>, 'endI18nContext': <function
do_endI18nContext>, 'endScope': <function do_endScope>, 'evaluateCode':
<function do_evaluateCode>, 'extendMacro': <function do_extendMacro>, ...},
opcode = 'optTag', self = <zope.tal.talinterpreter.TALInterpreter object>, args
= ('tal:scripts', None, 'tal', 0, [('startTag', ('tal:scripts', [('tal:define',
'portal python:here.portal_url.getPortalObject();', 'tal'), ('tal:repeat',
'script here/getResources', 'tal')]))], [('rawtextBeginScope', ('\n ', 6, (176,
6), 0, {'tal:attributes': "class python:test(resourceExists, nothing,
'notFound')", 'tal:define': "resourceExists python:path('exists:portal/%s' %
script.getId());"})), ('setLocal', ('resourceExists', <PythonExpr
path('exists:portal/%s' % script.getId())>)), ('startTag', ('fieldset',
[('tal:define', "resourceExists python:path('exists:portal/%s' %
script.getId());", 'tal'), ('tal:attributes', "class python:test(resourceExists,
nothing, 'notFound')", 'tal'), ('class', None, 'insert', <PythonExpr
test(resourceExists, nothing, 'notFound')>, False, None)])),
('rawtextBeginScope', ('\n\n ', 8, (179, 8), 0, {'name':
'scripts.sort:records:int', 'tal:attributes': 'value repeat/script/index',
'type': 'hidden'})), ('startEndTag', ('input', [('type', 'type="hidden"'),
('name', 'name="scripts.sort:records:int"'), ('tal:attributes', 'value
repeat/script/index', 'tal'), ('value', None, 'insert', <PathExpr
standard:'repeat/script/index'>, False, None)])), ('rawtextBeginScope', ('\n\n
<legend>\n <label class="hiddenLabel">Enabled?</label>\n ', 12, (184, 12), 1,
{'name': 'scripts.enabled:records:boolean', 'tal:attributes': 'checked
script/getEnabled', 'title': 'Enabled?', 'type': 'checkbox'})), ('startEndTag',
('input', [('type', 'type="checkbox"'), ('name',
'name="scripts.enabled:records:boolean"'), ('title', 'title="Enabled?"'),
('tal:attributes', 'checked script/getEnabled', 'tal'), ('checked', None,
'insert', <PathExpr standard:'script/getEnabled'>, False, None)])),
('rawtextBeginScope', ('\n <input type="hidden"
name="scripts....s:boolean:default" value="False" />\n\n ', 12, (189, 12), 1,
{'name': 'scripts.id:records:string', 'size': '30', 'tal:attributes': 'value
script/getId', 'type': 'text'})), ('startEndTag', ('input', [('type',
'type="text"'), ('name', 'name="scripts.id:records:string"'), ('size',
'size="30"'), ('tal:attributes', 'value script/getId', 'tal'), ('value', None,
'insert', <PathExpr standard:'script/getId'>, False, None)])),
('rawtextBeginScope', ('\n\n ', 12, (192, 12), 1, {'href': '#', 'onclick':
'return moveUp(this);', 'tal:attributes': 'href
string:moveResourceUp?id=${script/getId}', 'title': 'Move up'})), ('startTag',
('a', [('onclick', 'onclick="return moveUp(this);"'), ('href', '#', 'replace',
<StringExpr 'moveResourceUp?id=${script/getId}'>, False, None), ('title',
'title="Move up"'), ('tal:attributes', 'href
string:moveResourceUp?id=${script/getId}', 'tal')])), ('rawtextBeginScope', ('\n
↑\n </a>\n ', 12, (197, 12), 1, {'href': '#', 'onclick': 'return
moveDown(this);', 'tal:attributes': 'href
string:moveResourceDown?id=${script/getId}', 'title': 'Move down'})),
('startTag', ('a', [('onclick', 'onclick="return moveDown(this);"'), ('href',
'#', 'replace', <StringExpr 'moveResourceDown?id=${script/getId}'>, False,
None), ('title', 'title="Move down"'), ('tal:attributes', 'href
string:moveResourceDown?id=${script/getId}', 'tal')])), ('rawtextBeginScope',
('\n ↓\n </a>\n ', 12, (202, 12), 1, {'href': '#', 'style': 'color: red;',
'tal:attributes': 'href string:manage_removeScript?id=${script/getId}', 'title':
'Remove'})), ('startTag', ('a', [('href', '#', 'replace', <StringExpr
'manage_removeScript?id=${script/getId}'>, False, None), ('tal:attributes',
'href string:manage_removeScript?id=${script/getId}', 'tal'), ('style',
'style="color: red;"'), ('title', 'title="Remove"')])), ('rawtextBeginScope',
('\n x\n </a>\n ', 12, (207, 12), 1, {'tal:condition': 'not:resourceExists'})),
('condition', (<NotExpr 'resourceExists'>, [('startTag', (...)),
('rawtextOffset', (...))])), ('rawtextBeginScope', ('\n </legend>\n\n <div
class="scriptfo... <label>Condition</label>\n ', 12, (212, 12), 1, {'name':
'scripts.expression:records:string', 'size': '25', 'tal:attributes': 'value
script/getExpression', 'type': 'text'})), ('startEndTag', ('input', [('type',
'type="text"'), ('name', 'name="scripts.expression:records:string"'), ('size',
'size="25"'), ('tal:attributes', 'value script/getExpression', 'tal'), ('value',
None, 'insert', <PathExpr standard:'script/getExpression'>, False, None)])),
('rawtextBeginScope', ('\n\n <label>Compression type</label>\n ... <select
name="scripts.compression:records">', 55, (217, 16), 1, {'tal:attributes':
'value r;\n selected python:r == script.getCompression()', 'tal:content': 'r',
'tal:repeat': 'r here/getCompressionOptions'})), ...])
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tal/talinterpreter.py in do_optTag_tal(self=<zope.tal.talinterpreter.TALInterpreter object>, stuff=('tal:scripts', None, 'tal', 0, [('startTag', ('tal:scripts', [('tal:define', 'portal python:here.portal_url.getPortalObject();', 'tal'), ('tal:repeat', 'script here/getResources', 'tal')]))], [('rawtextBeginScope', ('\n ', 6, (176, 6), 0, {'tal:attributes': "class python:test(resourceExists, nothing, 'notFound')", 'tal:define': "resourceExists python:path('exists:portal/%s' % script.getId());"})), ('setLocal', ('resourceExists', <PythonExpr path('exists:portal/%s' % script.getId())>)), ('startTag', ('fieldset', [('tal:define', "resourceExists python:path('exists:portal/%s' % script.getId());", 'tal'), ('tal:attributes', "class python:test(resourceExists, nothing, 'notFound')", 'tal'), ('class', None, 'insert', <PythonExpr test(resourceExists, nothing, 'notFound')>, False, None)])), ('rawtextBeginScope', ('\n\n ', 8, (179, 8), 0, {'name': 'scripts.sort:records:int', 'tal:attributes': 'value repeat/script/index', 'type': 'hidden'})), ('startEndTag', ('input', [('type', 'type="hidden"'), ('name', 'name="scripts.sort:records:int"'), ('tal:attributes', 'value repeat/script/index', 'tal'), ('value', None, 'insert', <PathExpr standard:'repeat/script/index'>, False, None)])), ('rawtextBeginScope', ('\n\n <legend>\n <label class="hiddenLabel">Enabled?</label>\n ', 12, (184, 12), 1, {'name': 'scripts.enabled:records:boolean', 'tal:attributes': 'checked script/getEnabled', 'title': 'Enabled?', 'type': 'checkbox'})), ('startEndTag', ('input', [('type', 'type="checkbox"'), ('name', 'name="scripts.enabled:records:boolean"'), ('title', 'title="Enabled?"'), ('tal:attributes', 'checked script/getEnabled', 'tal'), ('checked', None, 'insert', <PathExpr standard:'script/getEnabled'>, False, None)])), ('rawtextBeginScope', ('\n <input type="hidden" name="scripts....s:boolean:default" value="False" />\n\n ', 12, (189, 12), 1, {'name': 'scripts.id:records:string', 'size': '30', 'tal:attributes': 'value script/getId', 'type': 'text'})), ('startEndTag', ('input', [('type', 'type="text"'), ('name', 'name="scripts.id:records:string"'), ('size', 'size="30"'), ('tal:attributes', 'value script/getId', 'tal'), ('value', None, 'insert', <PathExpr standard:'script/getId'>, False, None)])), ('rawtextBeginScope', ('\n\n ', 12, (192, 12), 1, {'href': '#', 'onclick': 'return moveUp(this);', 'tal:attributes': 'href string:moveResourceUp?id=${script/getId}', 'title': 'Move up'})), ('startTag', ('a', [('onclick', 'onclick="return moveUp(this);"'), ('href', '#', 'replace', <StringExpr 'moveResourceUp?id=${script/getId}'>, False, None), ('title', 'title="Move up"'), ('tal:attributes', 'href string:moveResourceUp?id=${script/getId}', 'tal')])), ('rawtextBeginScope', ('\n ↑\n </a>\n ', 12, (197, 12), 1, {'href': '#', 'onclick': 'return moveDown(this);', 'tal:attributes': 'href string:moveResourceDown?id=${script/getId}', 'title': 'Move down'})), ('startTag', ('a', [('onclick', 'onclick="return moveDown(this);"'), ('href', '#', 'replace', <StringExpr 'moveResourceDown?id=${script/getId}'>, False, None), ('title', 'title="Move down"'), ('tal:attributes', 'href string:moveResourceDown?id=${script/getId}', 'tal')])), ('rawtextBeginScope', ('\n ↓\n </a>\n ', 12, (202, 12), 1, {'href': '#', 'style': 'color: red;', 'tal:attributes': 'href string:manage_removeScript?id=${script/getId}', 'title': 'Remove'})), ('startTag', ('a', [('href', '#', 'replace', <StringExpr 'manage_removeScript?id=${script/getId}'>, False, None), ('tal:attributes', 'href string:manage_removeScript?id=${script/getId}', 'tal'), ('style', 'style="color: red;"'), ('title', 'title="Remove"')])), ('rawtextBeginScope', ('\n x\n </a>\n ', 12, (207, 12), 1, {'tal:condition': 'not:resourceExists'})), ('condition', (<NotExpr 'resourceExists'>, [('startTag', (...)), ('rawtextOffset', (...))])), ('rawtextBeginScope', ('\n </legend>\n\n <div class="scriptfo... <label>Condition</label>\n ', 12, (212, 12), 1, {'name': 'scripts.expression:records:string', 'size': '25', 'tal:attributes': 'value script/getExpression', 'type': 'text'})), ('startEndTag', ('input', [('type', 'type="text"'), ('name', 'name="scripts.expression:records:string"'), ('size', 'size="25"'), ('tal:attributes', 'value script/getExpression', 'tal'), ('value', None, 'insert', <PathExpr standard:'script/getExpression'>, False, None)])), ('rawtextBeginScope', ('\n\n <label>Compression type</label>\n ... <select name="scripts.compression:records">', 55, (217, 16), 1, {'tal:attributes': 'value r;\n selected python:r == script.getCompression()', 'tal:content': 'r', 'tal:repeat': 'r here/getCompressionOptions'})), ...]))
534 self.no_tag(stuff[-2], stuff[-1])
535 else:
536 self.do_optTag(stuff)
537 bytecode_handlers["optTag"] = do_optTag
538
self = <zope.tal.talinterpreter.TALInterpreter object>, self.do_optTag = <bound
method TALInterpreter.do_optTag of <zope.tal.talinterpreter.TALInterpreter
object>>, stuff = ('tal:scripts', None, 'tal', 0, [('startTag', ('tal:scripts',
[('tal:define', 'portal python:here.portal_url.getPortalObject();', 'tal'),
('tal:repeat', 'script here/getResources', 'tal')]))], [('rawtextBeginScope',
('\n ', 6, (176, 6), 0, {'tal:attributes': "class python:test(resourceExists,
nothing, 'notFound')", 'tal:define': "resourceExists
python:path('exists:portal/%s' % script.getId());"})), ('setLocal',
('resourceExists', <PythonExpr path('exists:portal/%s' % script.getId())>)),
('startTag', ('fieldset', [('tal:define', "resourceExists
python:path('exists:portal/%s' % script.getId());", 'tal'), ('tal:attributes',
"class python:test(resourceExists, nothing, 'notFound')", 'tal'), ('class',
None, 'insert', <PythonExpr test(resourceExists, nothing, 'notFound')>, False,
None)])), ('rawtextBeginScope', ('\n\n ', 8, (179, 8), 0, {'name':
'scripts.sort:records:int', 'tal:attributes': 'value repeat/script/index',
'type': 'hidden'})), ('startEndTag', ('input', [('type', 'type="hidden"'),
('name', 'name="scripts.sort:records:int"'), ('tal:attributes', 'value
repeat/script/index', 'tal'), ('value', None, 'insert', <PathExpr
standard:'repeat/script/index'>, False, None)])), ('rawtextBeginScope', ('\n\n
<legend>\n <label class="hiddenLabel">Enabled?</label>\n ', 12, (184, 12), 1,
{'name': 'scripts.enabled:records:boolean', 'tal:attributes': 'checked
script/getEnabled', 'title': 'Enabled?', 'type': 'checkbox'})), ('startEndTag',
('input', [('type', 'type="checkbox"'), ('name',
'name="scripts.enabled:records:boolean"'), ('title', 'title="Enabled?"'),
('tal:attributes', 'checked script/getEnabled', 'tal'), ('checked', None,
'insert', <PathExpr standard:'script/getEnabled'>, False, None)])),
('rawtextBeginScope', ('\n <input type="hidden"
name="scripts....s:boolean:default" value="False" />\n\n ', 12, (189, 12), 1,
{'name': 'scripts.id:records:string', 'size': '30', 'tal:attributes': 'value
script/getId', 'type': 'text'})), ('startEndTag', ('input', [('type',
'type="text"'), ('name', 'name="scripts.id:records:string"'), ('size',
'size="30"'), ('tal:attributes', 'value script/getId', 'tal'), ('value', None,
'insert', <PathExpr standard:'script/getId'>, False, None)])),
('rawtextBeginScope', ('\n\n ', 12, (192, 12), 1, {'href': '#', 'onclick':
'return moveUp(this);', 'tal:attributes': 'href
string:moveResourceUp?id=${script/getId}', 'title': 'Move up'})), ('startTag',
('a', [('onclick', 'onclick="return moveUp(this);"'), ('href', '#', 'replace',
<StringExpr 'moveResourceUp?id=${script/getId}'>, False, None), ('title',
'title="Move up"'), ('tal:attributes', 'href
string:moveResourceUp?id=${script/getId}', 'tal')])), ('rawtextBeginScope', ('\n
↑\n </a>\n ', 12, (197, 12), 1, {'href': '#', 'onclick': 'return
moveDown(this);', 'tal:attributes': 'href
string:moveResourceDown?id=${script/getId}', 'title': 'Move down'})),
('startTag', ('a', [('onclick', 'onclick="return moveDown(this);"'), ('href',
'#', 'replace', <StringExpr 'moveResourceDown?id=${script/getId}'>, False,
None), ('title', 'title="Move down"'), ('tal:attributes', 'href
string:moveResourceDown?id=${script/getId}', 'tal')])), ('rawtextBeginScope',
('\n ↓\n </a>\n ', 12, (202, 12), 1, {'href': '#', 'style': 'color: red;',
'tal:attributes': 'href string:manage_removeScript?id=${script/getId}', 'title':
'Remove'})), ('startTag', ('a', [('href', '#', 'replace', <StringExpr
'manage_removeScript?id=${script/getId}'>, False, None), ('tal:attributes',
'href string:manage_removeScript?id=${script/getId}', 'tal'), ('style',
'style="color: red;"'), ('title', 'title="Remove"')])), ('rawtextBeginScope',
('\n x\n </a>\n ', 12, (207, 12), 1, {'tal:condition': 'not:resourceExists'})),
('condition', (<NotExpr 'resourceExists'>, [('startTag', (...)),
('rawtextOffset', (...))])), ('rawtextBeginScope', ('\n </legend>\n\n <div
class="scriptfo... <label>Condition</label>\n ', 12, (212, 12), 1, {'name':
'scripts.expression:records:string', 'size': '25', 'tal:attributes': 'value
script/getExpression', 'type': 'text'})), ('startEndTag', ('input', [('type',
'type="text"'), ('name', 'name="scripts.expression:records:string"'), ('size',
'size="25"'), ('tal:attributes', 'value script/getExpression', 'tal'), ('value',
None, 'insert', <PathExpr standard:'script/getExpression'>, False, None)])),
('rawtextBeginScope', ('\n\n <label>Compression type</label>\n ... <select
name="scripts.compression:records">', 55, (217, 16), 1, {'tal:attributes':
'value r;\n selected python:r == script.getCompression()', 'tal:content': 'r',
'tal:repeat': 'r here/getCompressionOptions'})), ...])
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tal/talinterpreter.py in do_optTag(self=<zope.tal.talinterpreter.TALInterpreter object>, (name='tal:scripts', cexpr=None, tag_ns='tal', isend=0, start=[('startTag', ('tal:scripts', [('tal:define', 'portal python:here.portal_url.getPortalObject();', 'tal'), ('tal:repeat', 'script here/getResources', 'tal')]))], program=[('rawtextBeginScope', ('\n ', 6, (176, 6), 0, {'tal:attributes': "class python:test(resourceExists, nothing, 'notFound')", 'tal:define': "resourceExists python:path('exists:portal/%s' % script.getId());"})), ('setLocal', ('resourceExists', <PythonExpr path('exists:portal/%s' % script.getId())>)), ('startTag', ('fieldset', [('tal:define', "resourceExists python:path('exists:portal/%s' % script.getId());", 'tal'), ('tal:attributes', "class python:test(resourceExists, nothing, 'notFound')", 'tal'), ('class', None, 'insert', <PythonExpr test(resourceExists, nothing, 'notFound')>, False, None)])), ('rawtextBeginScope', ('\n\n ', 8, (179, 8), 0, {'name': 'scripts.sort:records:int', 'tal:attributes': 'value repeat/script/index', 'type': 'hidden'})), ('startEndTag', ('input', [('type', 'type="hidden"'), ('name', 'name="scripts.sort:records:int"'), ('tal:attributes', 'value repeat/script/index', 'tal'), ('value', None, 'insert', <PathExpr standard:'repeat/script/index'>, False, None)])), ('rawtextBeginScope', ('\n\n <legend>\n <label class="hiddenLabel">Enabled?</label>\n ', 12, (184, 12), 1, {'name': 'scripts.enabled:records:boolean', 'tal:attributes': 'checked script/getEnabled', 'title': 'Enabled?', 'type': 'checkbox'})), ('startEndTag', ('input', [('type', 'type="checkbox"'), ('name', 'name="scripts.enabled:records:boolean"'), ('title', 'title="Enabled?"'), ('tal:attributes', 'checked script/getEnabled', 'tal'), ('checked', None, 'insert', <PathExpr standard:'script/getEnabled'>, False, None)])), ('rawtextBeginScope', ('\n <input type="hidden" name="scripts....s:boolean:default" value="False" />\n\n ', 12, (189, 12), 1, {'name': 'scripts.id:records:string', 'size': '30', 'tal:attributes': 'value script/getId', 'type': 'text'})), ('startEndTag', ('input', [('type', 'type="text"'), ('name', 'name="scripts.id:records:string"'), ('size', 'size="30"'), ('tal:attributes', 'value script/getId', 'tal'), ('value', None, 'insert', <PathExpr standard:'script/getId'>, False, None)])), ('rawtextBeginScope', ('\n\n ', 12, (192, 12), 1, {'href': '#', 'onclick': 'return moveUp(this);', 'tal:attributes': 'href string:moveResourceUp?id=${script/getId}', 'title': 'Move up'})), ('startTag', ('a', [('onclick', 'onclick="return moveUp(this);"'), ('href', '#', 'replace', <StringExpr 'moveResourceUp?id=${script/getId}'>, False, None), ('title', 'title="Move up"'), ('tal:attributes', 'href string:moveResourceUp?id=${script/getId}', 'tal')])), ('rawtextBeginScope', ('\n ↑\n </a>\n ', 12, (197, 12), 1, {'href': '#', 'onclick': 'return moveDown(this);', 'tal:attributes': 'href string:moveResourceDown?id=${script/getId}', 'title': 'Move down'})), ('startTag', ('a', [('onclick', 'onclick="return moveDown(this);"'), ('href', '#', 'replace', <StringExpr 'moveResourceDown?id=${script/getId}'>, False, None), ('title', 'title="Move down"'), ('tal:attributes', 'href string:moveResourceDown?id=${script/getId}', 'tal')])), ('rawtextBeginScope', ('\n ↓\n </a>\n ', 12, (202, 12), 1, {'href': '#', 'style': 'color: red;', 'tal:attributes': 'href string:manage_removeScript?id=${script/getId}', 'title': 'Remove'})), ('startTag', ('a', [('href', '#', 'replace', <StringExpr 'manage_removeScript?id=${script/getId}'>, False, None), ('tal:attributes', 'href string:manage_removeScript?id=${script/getId}', 'tal'), ('style', 'style="color: red;"'), ('title', 'title="Remove"')])), ('rawtextBeginScope', ('\n x\n </a>\n ', 12, (207, 12), 1, {'tal:condition': 'not:resourceExists'})), ('condition', (<NotExpr 'resourceExists'>, [('startTag', ('span', [...])), ('rawtextOffset', ('(resource not found or not accessible)</span>', 45))])), ('rawtextBeginScope', ('\n </legend>\n\n <div class="scriptfo... <label>Condition</label>\n ', 12, (212, 12), 1, {'name': 'scripts.expression:records:string', 'size': '25', 'tal:attributes': 'value script/getExpression', 'type': 'text'})), ('startEndTag', ('input', [('type', 'type="text"'), ('name', 'name="scripts.expression:records:string"'), ('size', 'size="25"'), ('tal:attributes', 'value script/getExpression', 'tal'), ('value', None, 'insert', <PathExpr standard:'script/getExpression'>, False, None)])), ('rawtextBeginScope', ('\n\n <label>Compression type</label>\n ... <select name="scripts.compression:records">', 55, (217, 16), 1, {'tal:attributes': 'value r;\n selected python:r == script.getCompression()', 'tal:content': 'r', 'tal:repeat': 'r here/getCompressionOptions'})), ...]), omit=0)
519 omit=0):
520 if tag_ns and not self.showtal:
521 return self.no_tag(start, program)
522
523 self.interpret(start)
self = <zope.tal.talinterpreter.TALInterpreter object>, self.no_tag = <bound
method TALInterpreter.no_tag of <zope.tal.talinterpreter.TALInterpreter
object>>, start = [('startTag', ('tal:scripts', [('tal:define', 'portal
python:here.portal_url.getPortalObject();', 'tal'), ('tal:repeat', 'script
here/getResources', 'tal')]))], program = [('rawtextBeginScope', ('\n ', 6,
(176, 6), 0, {'tal:attributes': "class python:test(resourceExists, nothing,
'notFound')", 'tal:define': "resourceExists python:path('exists:portal/%s' %
script.getId());"})), ('setLocal', ('resourceExists', <PythonExpr
path('exists:portal/%s' % script.getId())>)), ('startTag', ('fieldset',
[('tal:define', "resourceExists python:path('exists:portal/%s' %
script.getId());", 'tal'), ('tal:attributes', "class python:test(resourceExists,
nothing, 'notFound')", 'tal'), ('class', None, 'insert', <PythonExpr
test(resourceExists, nothing, 'notFound')>, False, None)])),
('rawtextBeginScope', ('\n\n ', 8, (179, 8), 0, {'name':
'scripts.sort:records:int', 'tal:attributes': 'value repeat/script/index',
'type': 'hidden'})), ('startEndTag', ('input', [('type', 'type="hidden"'),
('name', 'name="scripts.sort:records:int"'), ('tal:attributes', 'value
repeat/script/index', 'tal'), ('value', None, 'insert', <PathExpr
standard:'repeat/script/index'>, False, None)])), ('rawtextBeginScope', ('\n\n
<legend>\n <label class="hiddenLabel">Enabled?</label>\n ', 12, (184, 12), 1,
{'name': 'scripts.enabled:records:boolean', 'tal:attributes': 'checked
script/getEnabled', 'title': 'Enabled?', 'type': 'checkbox'})), ('startEndTag',
('input', [('type', 'type="checkbox"'), ('name',
'name="scripts.enabled:records:boolean"'), ('title', 'title="Enabled?"'),
('tal:attributes', 'checked script/getEnabled', 'tal'), ('checked', None,
'insert', <PathExpr standard:'script/getEnabled'>, False, None)])),
('rawtextBeginScope', ('\n <input type="hidden"
name="scripts....s:boolean:default" value="False" />\n\n ', 12, (189, 12), 1,
{'name': 'scripts.id:records:string', 'size': '30', 'tal:attributes': 'value
script/getId', 'type': 'text'})), ('startEndTag', ('input', [('type',
'type="text"'), ('name', 'name="scripts.id:records:string"'), ('size',
'size="30"'), ('tal:attributes', 'value script/getId', 'tal'), ('value', None,
'insert', <PathExpr standard:'script/getId'>, False, None)])),
('rawtextBeginScope', ('\n\n ', 12, (192, 12), 1, {'href': '#', 'onclick':
'return moveUp(this);', 'tal:attributes': 'href
string:moveResourceUp?id=${script/getId}', 'title': 'Move up'})), ('startTag',
('a', [('onclick', 'onclick="return moveUp(this);"'), ('href', '#', 'replace',
<StringExpr 'moveResourceUp?id=${script/getId}'>, False, None), ('title',
'title="Move up"'), ('tal:attributes', 'href
string:moveResourceUp?id=${script/getId}', 'tal')])), ('rawtextBeginScope', ('\n
↑\n </a>\n ', 12, (197, 12), 1, {'href': '#', 'onclick': 'return
moveDown(this);', 'tal:attributes': 'href
string:moveResourceDown?id=${script/getId}', 'title': 'Move down'})),
('startTag', ('a', [('onclick', 'onclick="return moveDown(this);"'), ('href',
'#', 'replace', <StringExpr 'moveResourceDown?id=${script/getId}'>, False,
None), ('title', 'title="Move down"'), ('tal:attributes', 'href
string:moveResourceDown?id=${script/getId}', 'tal')])), ('rawtextBeginScope',
('\n ↓\n </a>\n ', 12, (202, 12), 1, {'href': '#', 'style': 'color: red;',
'tal:attributes': 'href string:manage_removeScript?id=${script/getId}', 'title':
'Remove'})), ('startTag', ('a', [('href', '#', 'replace', <StringExpr
'manage_removeScript?id=${script/getId}'>, False, None), ('tal:attributes',
'href string:manage_removeScript?id=${script/getId}', 'tal'), ('style',
'style="color: red;"'), ('title', 'title="Remove"')])), ('rawtextBeginScope',
('\n x\n </a>\n ', 12, (207, 12), 1, {'tal:condition': 'not:resourceExists'})),
('condition', (<NotExpr 'resourceExists'>, [('startTag', ('span', [...])),
('rawtextOffset', ('(resource not found or not accessible)</span>', 45))])),
('rawtextBeginScope', ('\n </legend>\n\n <div class="scriptfo...
<label>Condition</label>\n ', 12, (212, 12), 1, {'name':
'scripts.expression:records:string', 'size': '25', 'tal:attributes': 'value
script/getExpression', 'type': 'text'})), ('startEndTag', ('input', [('type',
'type="text"'), ('name', 'name="scripts.expression:records:string"'), ('size',
'size="25"'), ('tal:attributes', 'value script/getExpression', 'tal'), ('value',
None, 'insert', <PathExpr standard:'script/getExpression'>, False, None)])),
('rawtextBeginScope', ('\n\n <label>Compression type</label>\n ... <select
name="scripts.compression:records">', 55, (217, 16), 1, {'tal:attributes':
'value r;\n selected python:r == script.getCompression()', 'tal:content': 'r',
'tal:repeat': 'r here/getCompressionOptions'})), ...]
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tal/talinterpreter.py in no_tag(self=<zope.tal.talinterpreter.TALInterpreter object>, start=[('startTag', ('tal:scripts', [('tal:define', 'portal python:here.portal_url.getPortalObject();', 'tal'), ('tal:repeat', 'script here/getResources', 'tal')]))], program=[('rawtextBeginScope', ('\n ', 6, (176, 6), 0, {'tal:attributes': "class python:test(resourceExists, nothing, 'notFound')", 'tal:define': "resourceExists python:path('exists:portal/%s' % script.getId());"})), ('setLocal', ('resourceExists', <PythonExpr path('exists:portal/%s' % script.getId())>)), ('startTag', ('fieldset', [('tal:define', "resourceExists python:path('exists:portal/%s' % script.getId());", 'tal'), ('tal:attributes', "class python:test(resourceExists, nothing, 'notFound')", 'tal'), ('class', None, 'insert', <PythonExpr test(resourceExists, nothing, 'notFound')>, False, None)])), ('rawtextBeginScope', ('\n\n ', 8, (179, 8), 0, {'name': 'scripts.sort:records:int', 'tal:attributes': 'value repeat/script/index', 'type': 'hidden'})), ('startEndTag', ('input', [('type', 'type="hidden"'), ('name', 'name="scripts.sort:records:int"'), ('tal:attributes', 'value repeat/script/index', 'tal'), ('value', None, 'insert', <PathExpr standard:'repeat/script/index'>, False, None)])), ('rawtextBeginScope', ('\n\n <legend>\n <label class="hiddenLabel">Enabled?</label>\n ', 12, (184, 12), 1, {'name': 'scripts.enabled:records:boolean', 'tal:attributes': 'checked script/getEnabled', 'title': 'Enabled?', 'type': 'checkbox'})), ('startEndTag', ('input', [('type', 'type="checkbox"'), ('name', 'name="scripts.enabled:records:boolean"'), ('title', 'title="Enabled?"'), ('tal:attributes', 'checked script/getEnabled', 'tal'), ('checked', None, 'insert', <PathExpr standard:'script/getEnabled'>, False, None)])), ('rawtextBeginScope', ('\n <input type="hidden" name="scripts....s:boolean:default" value="False" />\n\n ', 12, (189, 12), 1, {'name': 'scripts.id:records:string', 'size': '30', 'tal:attributes': 'value script/getId', 'type': 'text'})), ('startEndTag', ('input', [('type', 'type="text"'), ('name', 'name="scripts.id:records:string"'), ('size', 'size="30"'), ('tal:attributes', 'value script/getId', 'tal'), ('value', None, 'insert', <PathExpr standard:'script/getId'>, False, None)])), ('rawtextBeginScope', ('\n\n ', 12, (192, 12), 1, {'href': '#', 'onclick': 'return moveUp(this);', 'tal:attributes': 'href string:moveResourceUp?id=${script/getId}', 'title': 'Move up'})), ('startTag', ('a', [('onclick', 'onclick="return moveUp(this);"'), ('href', '#', 'replace', <StringExpr 'moveResourceUp?id=${script/getId}'>, False, None), ('title', 'title="Move up"'), ('tal:attributes', 'href string:moveResourceUp?id=${script/getId}', 'tal')])), ('rawtextBeginScope', ('\n ↑\n </a>\n ', 12, (197, 12), 1, {'href': '#', 'onclick': 'return moveDown(this);', 'tal:attributes': 'href string:moveResourceDown?id=${script/getId}', 'title': 'Move down'})), ('startTag', ('a', [('onclick', 'onclick="return moveDown(this);"'), ('href', '#', 'replace', <StringExpr 'moveResourceDown?id=${script/getId}'>, False, None), ('title', 'title="Move down"'), ('tal:attributes', 'href string:moveResourceDown?id=${script/getId}', 'tal')])), ('rawtextBeginScope', ('\n ↓\n </a>\n ', 12, (202, 12), 1, {'href': '#', 'style': 'color: red;', 'tal:attributes': 'href string:manage_removeScript?id=${script/getId}', 'title': 'Remove'})), ('startTag', ('a', [('href', '#', 'replace', <StringExpr 'manage_removeScript?id=${script/getId}'>, False, None), ('tal:attributes', 'href string:manage_removeScript?id=${script/getId}', 'tal'), ('style', 'style="color: red;"'), ('title', 'title="Remove"')])), ('rawtextBeginScope', ('\n x\n </a>\n ', 12, (207, 12), 1, {'tal:condition': 'not:resourceExists'})), ('condition', (<NotExpr 'resourceExists'>, [('startTag', ('span', [...])), ('rawtextOffset', ('(resource not found or not accessible)</span>', 45))])), ('rawtextBeginScope', ('\n </legend>\n\n <div class="scriptfo... <label>Condition</label>\n ', 12, (212, 12), 1, {'name': 'scripts.expression:records:string', 'size': '25', 'tal:attributes': 'value script/getExpression', 'type': 'text'})), ('startEndTag', ('input', [('type', 'type="text"'), ('name', 'name="scripts.expression:records:string"'), ('size', 'size="25"'), ('tal:attributes', 'value script/getExpression', 'tal'), ('value', None, 'insert', <PathExpr standard:'script/getExpression'>, False, None)])), ('rawtextBeginScope', ('\n\n <label>Compression type</label>\n ... <select name="scripts.compression:records">', 55, (217, 16), 1, {'tal:attributes': 'value r;\n selected python:r == script.getCompression()', 'tal:content': 'r', 'tal:repeat': 'r here/getCompressionOptions'})), ...])
514 self.interpret(start)
515 self.restoreOutputState(state)
516 self.interpret(program)
517
518 def do_optTag(self, (name, cexpr, tag_ns, isend, start, program),
self = <zope.tal.talinterpreter.TALInterpreter object>, self.interpret = <bound
method TALInterpreter.interpret of <zope.tal.talinterpreter.TALInterpreter
object>>, program = [('rawtextBeginScope', ('\n ', 6, (176, 6), 0,
{'tal:attributes': "class python:test(resourceExists, nothing, 'notFound')",
'tal:define': "resourceExists python:path('exists:portal/%s' %
script.getId());"})), ('setLocal', ('resourceExists', <PythonExpr
path('exists:portal/%s' % script.getId())>)), ('startTag', ('fieldset',
[('tal:define', "resourceExists python:path('exists:portal/%s' %
script.getId());", 'tal'), ('tal:attributes', "class python:test(resourceExists,
nothing, 'notFound')", 'tal'), ('class', None, 'insert', <PythonExpr
test(resourceExists, nothing, 'notFound')>, False, None)])),
('rawtextBeginScope', ('\n\n ', 8, (179, 8), 0, {'name':
'scripts.sort:records:int', 'tal:attributes': 'value repeat/script/index',
'type': 'hidden'})), ('startEndTag', ('input', [('type', 'type="hidden"'),
('name', 'name="scripts.sort:records:int"'), ('tal:attributes', 'value
repeat/script/index', 'tal'), ('value', None, 'insert', <PathExpr
standard:'repeat/script/index'>, False, None)])), ('rawtextBeginScope', ('\n\n
<legend>\n <label class="hiddenLabel">Enabled?</label>\n ', 12, (184, 12), 1,
{'name': 'scripts.enabled:records:boolean', 'tal:attributes': 'checked
script/getEnabled', 'title': 'Enabled?', 'type': 'checkbox'})), ('startEndTag',
('input', [('type', 'type="checkbox"'), ('name',
'name="scripts.enabled:records:boolean"'), ('title', 'title="Enabled?"'),
('tal:attributes', 'checked script/getEnabled', 'tal'), ('checked', None,
'insert', <PathExpr standard:'script/getEnabled'>, False, None)])),
('rawtextBeginScope', ('\n <input type="hidden"
name="scripts....s:boolean:default" value="False" />\n\n ', 12, (189, 12), 1,
{'name': 'scripts.id:records:string', 'size': '30', 'tal:attributes': 'value
script/getId', 'type': 'text'})), ('startEndTag', ('input', [('type',
'type="text"'), ('name', 'name="scripts.id:records:string"'), ('size',
'size="30"'), ('tal:attributes', 'value script/getId', 'tal'), ('value', None,
'insert', <PathExpr standard:'script/getId'>, False, None)])),
('rawtextBeginScope', ('\n\n ', 12, (192, 12), 1, {'href': '#', 'onclick':
'return moveUp(this);', 'tal:attributes': 'href
string:moveResourceUp?id=${script/getId}', 'title': 'Move up'})), ('startTag',
('a', [('onclick', 'onclick="return moveUp(this);"'), ('href', '#', 'replace',
<StringExpr 'moveResourceUp?id=${script/getId}'>, False, None), ('title',
'title="Move up"'), ('tal:attributes', 'href
string:moveResourceUp?id=${script/getId}', 'tal')])), ('rawtextBeginScope', ('\n
↑\n </a>\n ', 12, (197, 12), 1, {'href': '#', 'onclick': 'return
moveDown(this);', 'tal:attributes': 'href
string:moveResourceDown?id=${script/getId}', 'title': 'Move down'})),
('startTag', ('a', [('onclick', 'onclick="return moveDown(this);"'), ('href',
'#', 'replace', <StringExpr 'moveResourceDown?id=${script/getId}'>, False,
None), ('title', 'title="Move down"'), ('tal:attributes', 'href
string:moveResourceDown?id=${script/getId}', 'tal')])), ('rawtextBeginScope',
('\n ↓\n </a>\n ', 12, (202, 12), 1, {'href': '#', 'style': 'color: red;',
'tal:attributes': 'href string:manage_removeScript?id=${script/getId}', 'title':
'Remove'})), ('startTag', ('a', [('href', '#', 'replace', <StringExpr
'manage_removeScript?id=${script/getId}'>, False, None), ('tal:attributes',
'href string:manage_removeScript?id=${script/getId}', 'tal'), ('style',
'style="color: red;"'), ('title', 'title="Remove"')])), ('rawtextBeginScope',
('\n x\n </a>\n ', 12, (207, 12), 1, {'tal:condition': 'not:resourceExists'})),
('condition', (<NotExpr 'resourceExists'>, [('startTag', ('span', [...])),
('rawtextOffset', ('(resource not found or not accessible)</span>', 45))])),
('rawtextBeginScope', ('\n </legend>\n\n <div class="scriptfo...
<label>Condition</label>\n ', 12, (212, 12), 1, {'name':
'scripts.expression:records:string', 'size': '25', 'tal:attributes': 'value
script/getExpression', 'type': 'text'})), ('startEndTag', ('input', [('type',
'type="text"'), ('name', 'name="scripts.expression:records:string"'), ('size',
'size="25"'), ('tal:attributes', 'value script/getExpression', 'tal'), ('value',
None, 'insert', <PathExpr standard:'script/getExpression'>, False, None)])),
('rawtextBeginScope', ('\n\n <label>Compression type</label>\n ... <select
name="scripts.compression:records">', 55, (217, 16), 1, {'tal:attributes':
'value r;\n selected python:r == script.getCompression()', 'tal:content': 'r',
'tal:repeat': 'r here/getCompressionOptions'})), ...]
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tal/talinterpreter.py in interpret(self=<zope.tal.talinterpreter.TALInterpreter object>, program=[('rawtextBeginScope', ('\n ', 6, (176, 6), 0, {'tal:attributes': "class python:test(resourceExists, nothing, 'notFound')", 'tal:define': "resourceExists python:path('exists:portal/%s' % script.getId());"})), ('setLocal', ('resourceExists', <PythonExpr path('exists:portal/%s' % script.getId())>)), ('startTag', ('fieldset', [('tal:define', "resourceExists python:path('exists:portal/%s' % script.getId());", 'tal'), ('tal:attributes', "class python:test(resourceExists, nothing, 'notFound')", 'tal'), ('class', None, 'insert', <PythonExpr test(resourceExists, nothing, 'notFound')>, False, None)])), ('rawtextBeginScope', ('\n\n ', 8, (179, 8), 0, {'name': 'scripts.sort:records:int', 'tal:attributes': 'value repeat/script/index', 'type': 'hidden'})), ('startEndTag', ('input', [('type', 'type="hidden"'), ('name', 'name="scripts.sort:records:int"'), ('tal:attributes', 'value repeat/script/index', 'tal'), ('value', None, 'insert', <PathExpr standard:'repeat/script/index'>, False, None)])), ('rawtextBeginScope', ('\n\n <legend>\n <label class="hiddenLabel">Enabled?</label>\n ', 12, (184, 12), 1, {'name': 'scripts.enabled:records:boolean', 'tal:attributes': 'checked script/getEnabled', 'title': 'Enabled?', 'type': 'checkbox'})), ('startEndTag', ('input', [('type', 'type="checkbox"'), ('name', 'name="scripts.enabled:records:boolean"'), ('title', 'title="Enabled?"'), ('tal:attributes', 'checked script/getEnabled', 'tal'), ('checked', None, 'insert', <PathExpr standard:'script/getEnabled'>, False, None)])), ('rawtextBeginScope', ('\n <input type="hidden" name="scripts....s:boolean:default" value="False" />\n\n ', 12, (189, 12), 1, {'name': 'scripts.id:records:string', 'size': '30', 'tal:attributes': 'value script/getId', 'type': 'text'})), ('startEndTag', ('input', [('type', 'type="text"'), ('name', 'name="scripts.id:records:string"'), ('size', 'size="30"'), ('tal:attributes', 'value script/getId', 'tal'), ('value', None, 'insert', <PathExpr standard:'script/getId'>, False, None)])), ('rawtextBeginScope', ('\n\n ', 12, (192, 12), 1, {'href': '#', 'onclick': 'return moveUp(this);', 'tal:attributes': 'href string:moveResourceUp?id=${script/getId}', 'title': 'Move up'})), ('startTag', ('a', [('onclick', 'onclick="return moveUp(this);"'), ('href', '#', 'replace', <StringExpr 'moveResourceUp?id=${script/getId}'>, False, None), ('title', 'title="Move up"'), ('tal:attributes', 'href string:moveResourceUp?id=${script/getId}', 'tal')])), ('rawtextBeginScope', ('\n ↑\n </a>\n ', 12, (197, 12), 1, {'href': '#', 'onclick': 'return moveDown(this);', 'tal:attributes': 'href string:moveResourceDown?id=${script/getId}', 'title': 'Move down'})), ('startTag', ('a', [('onclick', 'onclick="return moveDown(this);"'), ('href', '#', 'replace', <StringExpr 'moveResourceDown?id=${script/getId}'>, False, None), ('title', 'title="Move down"'), ('tal:attributes', 'href string:moveResourceDown?id=${script/getId}', 'tal')])), ('rawtextBeginScope', ('\n ↓\n </a>\n ', 12, (202, 12), 1, {'href': '#', 'style': 'color: red;', 'tal:attributes': 'href string:manage_removeScript?id=${script/getId}', 'title': 'Remove'})), ('startTag', ('a', [('href', '#', 'replace', <StringExpr 'manage_removeScript?id=${script/getId}'>, False, None), ('tal:attributes', 'href string:manage_removeScript?id=${script/getId}', 'tal'), ('style', 'style="color: red;"'), ('title', 'title="Remove"')])), ('rawtextBeginScope', ('\n x\n </a>\n ', 12, (207, 12), 1, {'tal:condition': 'not:resourceExists'})), ('condition', (<NotExpr 'resourceExists'>, [('startTag', ('span', [...])), ('rawtextOffset', ('(resource not found or not accessible)</span>', 45))])), ('rawtextBeginScope', ('\n </legend>\n\n <div class="scriptfo... <label>Condition</label>\n ', 12, (212, 12), 1, {'name': 'scripts.expression:records:string', 'size': '25', 'tal:attributes': 'value script/getExpression', 'type': 'text'})), ('startEndTag', ('input', [('type', 'type="text"'), ('name', 'name="scripts.expression:records:string"'), ('size', 'size="25"'), ('tal:attributes', 'value script/getExpression', 'tal'), ('value', None, 'insert', <PathExpr standard:'script/getExpression'>, False, None)])), ('rawtextBeginScope', ('\n\n <label>Compression type</label>\n ... <select name="scripts.compression:records">', 55, (217, 16), 1, {'tal:attributes': 'value r;\n selected python:r == script.getCompression()', 'tal:content': 'r', 'tal:repeat': 'r here/getCompressionOptions'})), ...])
344 else:
345 for (opcode, args) in program:
346 handlers[opcode](self, args)
347 finally:
348 self.level = oldlevel
handlers = {'<attrAction>': <function attrAction_tal>, 'beginI18nContext':
<function do_beginI18nContext>, 'beginScope': <function do_beginScope_tal>,
'condition': <function do_condition>, 'defineMacro': <function do_defineMacro>,
'defineSlot': <function do_defineSlot>, 'endI18nContext': <function
do_endI18nContext>, 'endScope': <function do_endScope>, 'evaluateCode':
<function do_evaluateCode>, 'extendMacro': <function do_extendMacro>, ...},
opcode = 'setLocal', self = <zope.tal.talinterpreter.TALInterpreter object>,
args = ('resourceExists', <PythonExpr path('exists:portal/%s' % script.getId())>)
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tal/talinterpreter.py in do_setLocal_tal(self=<zope.tal.talinterpreter.TALInterpreter object>, (name='resourceExists', expr=<PythonExpr path('exists:portal/%s' % script.getId())>))
584
585 def do_setLocal_tal(self, (name, expr)):
586 self.engine.setLocal(name, self.engine.evaluateValue(expr))
587 bytecode_handlers["setLocal"] = do_setLocal
588
self = <zope.tal.talinterpreter.TALInterpreter object>, self.engine =
<Products.PageTemplates.Expressions.ZopeContext object>, self.engine.setLocal =
<bound method ZopeContext.setLocal of
<Products.PageTemplates.Expressions.ZopeContext object>>, name =
'resourceExists', self.engine.evaluateValue = <bound method ZopeContext.evaluate
of <Products.PageTemplates.Expressions.ZopeContext object>>, expr = <PythonExpr
path('exists:portal/%s' % script.getId())>
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tales/tales.py in evaluate(self=<Products.PageTemplates.Expressions.ZopeContext object>, expression=<PythonExpr path('exists:portal/%s' % script.getId())>)
694 __traceback_supplement__ = (
695 TALESTracebackSupplement, self, expression)
696 return expression(self)
697
698 evaluateValue = evaluate
expression = <PythonExpr path('exists:portal/%s' % script.getId())>, self =
<Products.PageTemplates.Expressions.ZopeContext object>
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/Products/PageTemplates/ZRPythonExpr.py in __call__(self=<PythonExpr path('exists:portal/%s' % script.getId())>, econtext=<Products.PageTemplates.Expressions.ZopeContext object>)
47 vars = self._bind_used_names(econtext, {})
48 vars.update(self._globals)
49 return eval(self._code, vars, {})
50
51 class _SecureModuleImporter:
builtin eval = <built-in function eval>, self = <PythonExpr
path('exists:portal/%s' % script.getId())>, self._code = <code object
<expression> at 0x7f266d8e5180, file "PythonExpr", line 1>, vars =
{'__builtins__': {'ArithmeticError': <class exceptions.ArithmeticError>,
'AssertionError': <class exceptions.AssertionError>, 'AttributeError': <class
exceptions.AttributeError>, 'DateTime': <class DateTime.DateTime.DateTime>,
'DeprecationWarning': <class exceptions.DeprecationWarning>, 'EOFError': <class
exceptions.EOFError>, 'EnvironmentError': <class exceptions.EnvironmentError>,
'Exception': <class exceptions.Exception>, 'False': False, 'FloatingPointError':
<class exceptions.FloatingPointError>, ...}, '__debug__': True, '__metaclass__':
<function _metaclass>, '_apply_': <function guarded_apply>, '_getattr_':
<built-in function guarded_getattr>, '_getitem_': <function guarded_getitem>,
'_getiter_': <function guarded_iter>, '_inplacevar_': <function
protected_inplacevar>, '_print_': <class
RestrictedPython.PrintCollector.PrintCollector>, '_write_': <function guard>, ...}
/var/www/jgsi_beta/PythonExpr in ()
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tales/pythonexpr.py in __call__(self=<zope.tales.pythonexpr.ExprTypeProxy object>, text='exists:portal/')
73 self._econtext = econtext
74
75 def __call__(self, text):
76 return self._handler(self._name, text,
77 self._econtext._engine)(self._econtext)
self = <zope.tales.pythonexpr.ExprTypeProxy object>, self._econtext =
<Products.PageTemplates.Expressions.ZopeContext object>, self._econtext._engine
= <Products.PageTemplates.Expressions.ZopeEngine object>
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/Products/PageTemplates/Expressions.py in __init__(self=<PathExpr path:'exists:portal/'>, name='path', expr='exists:portal/', engine=<Products.PageTemplates.Expressions.ZopeEngine object>)
135 expr = 'nothing'
136 super(ZopePathExpr, self).__init__(name, expr, engine,
137 self._TRAVERSER)
138
139 # override this to support different call metrics (see bottom of
self = <PathExpr path:'exists:portal/'>, self._TRAVERSER = <function
boboAwareZopeTraverse>
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tales/expressions.py in __init__(self=<PathExpr path:'exists:portal/'>, name='path', expr='exists:portal/', engine=<Products.PageTemplates.Expressions.ZopeEngine object>, traverser=<function boboAwareZopeTraverse>)
165 # This part is the start of another expression type,
166 # so glue it back together and compile it.
167 add(engine.compile('|'.join(paths[i:]).lstrip()))
168 self._hybrid = True
169 break
add = <built-in method append of list object>, engine =
<Products.PageTemplates.Expressions.ZopeEngine object>, engine.compile = <bound
method ZopeEngine.compile of <Products.PageTemplates.Expressions.ZopeEngine
object>>, '|'.join undefined, paths = ['exists:portal/'], i = 0, ).lstrip undefined
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tales/tales.py in compile(self=<Products.PageTemplates.Expressions.ZopeEngine object>, expression='exists:portal/')
596 except KeyError:
597 raise CompilerError('Unrecognized expression type "%s".' % type)
598 return handler(type, expr, self)
599
600 def getContext(self, contexts=None, **kwcontexts):
handler = <class 'Products.PageTemplates.Expressions.ZopePathExpr'>, type =
'exists', expr = 'portal/', self =
<Products.PageTemplates.Expressions.ZopeEngine object>
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/Products/PageTemplates/Expressions.py in __init__(self=<PathExpr exists:'portal/'>, name='exists', expr='portal/', engine=<Products.PageTemplates.Expressions.ZopeEngine object>)
135 expr = 'nothing'
136 super(ZopePathExpr, self).__init__(name, expr, engine,
137 self._TRAVERSER)
138
139 # override this to support different call metrics (see bottom of
self = <PathExpr exists:'portal/'>, self._TRAVERSER = <function
boboAwareZopeTraverse>
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tales/expressions.py in __init__(self=<PathExpr exists:'portal/'>, name='exists', expr='portal/', engine=<Products.PageTemplates.Expressions.ZopeEngine object>, traverser=<function boboAwareZopeTraverse>)
168 self._hybrid = True
169 break
170 add(SubPathExpr(path, traverser, engine)._eval)
171
172 def _exists(self, econtext):
add = <built-in method append of list object>, global SubPathExpr = <class
'zope.tales.expressions.SubPathExpr'>, path = 'portal/', traverser = <function
boboAwareZopeTraverse>, engine = <Products.PageTemplates.Expressions.ZopeEngine
object>, )._eval undefined
/var/www/jgsi_beta/lib/python2.4/site-packages/zopelib-2.10.5.0-py2.4-linux-x86_64.egg/zope/tales/expressions.py in __init__(self=<zope.tales.expressions.SubPathExpr object>, path='portal/', traverser=<function boboAwareZopeTraverse>, engine=<Products.PageTemplates.Expressions.ZopeEngine object>)
54 for element in str(path).strip().split('/'):
55 if not element:
56 raise engine.getCompilerError()(
57 'Path element may not be empty in %r' % path)
58 if element.startswith('?'):
engine = <Products.PageTemplates.Expressions.ZopeEngine object>,
engine.getCompilerError = <bound method ZopeEngine.getCompilerError of
<Products.PageTemplates.Expressions.ZopeEngine object>>, path = 'portal/'
CompilerError: Path element may not be empty in 'portal/'
args = ("Path element may not be empty in 'portal/'",)
----------
messages: 84
nosy: ddurham
priority: bug
status: unread
title: Editing a resource to have an empty path causes error
__________________________________
Repoze Bugs <bugs at bugs.repoze.org>
<http://bugs.repoze.org/issue29>
__________________________________
More information about the Repoze-dev
mailing list