Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tile raises MissingParameterError #154

Closed
hvelarde opened this issue Mar 7, 2016 · 0 comments · Fixed by #156
Closed

Tile raises MissingParameterError #154

hvelarde opened this issue Mar 7, 2016 · 0 comments · Fixed by #156
Assignees
Labels

Comments

@hvelarde
Copy link
Member

hvelarde commented Mar 7, 2016

Seems that happens while accessing a tile with a configuration that shows the date:

2016-03-07T16:58:21 ERROR plone.subrequest Error handling subrequest to http://www.example.com/frontpage/@@collective.nitf/cbfd54db0600467b9e7511df95a499df
Traceback (most recent call last):
  File "/home/plone/my.project/eggs/plone.subrequest-1.6.9-py2.7.egg/plone/subrequest/__init__.py", line 136, in subrequest
    bind=1)
  File "/home/plone/my.project/eggs/Zope2-2.13.22-py2.7.egg/ZPublisher/mapply.py", line 78, in mapply
    else: return object(*args)
  File "/home/plone/my.project/eggs/plone.tiles-1.5.1-py2.7.egg/plone/tiles/esi.py", line 59, in __call__
    return self.index(*args, **kwargs)
  File "/home/plone/my.project/eggs/zope.browserpage-3.12.2-py2.7.egg/zope/browserpage/viewpagetemplatefile.py", line 83, in __call__
    return self.im_func(im_self, *args, **kw)
  File "/home/plone/my.project/eggs/zope.browserpage-3.12.2-py2.7.egg/zope/browserpage/viewpagetemplatefile.py", line 51, in __call__
    sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
  File "/home/plone/my.project/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 132, in pt_render
    strictinsert=0, sourceAnnotations=sourceAnnotations
  File "/home/plone/my.project/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 240, in __call__
    interpreter()
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 271, in __call__
    self.interpret(self.program)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 852, in do_condition
    self.interpret(block)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 821, in do_loop_tal
    self.interpret(block)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 533, in do_optTag_tal
    self.do_optTag(stuff)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 518, in do_optTag
    return self.no_tag(start, program)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 513, in no_tag
    self.interpret(program)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 852, in do_condition
    self.interpret(block)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 533, in do_optTag_tal
    self.do_optTag(stuff)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 518, in do_optTag
    return self.no_tag(start, program)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 513, in no_tag
    self.interpret(program)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/home/plone/my.project/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 620, in do_insertText_tal
    text = self.engine.evaluateText(stuff[0])
  File "/home/plone/my.project/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/tales.py", line 704, in evaluateText
    text = self.evaluate(expr)
  File "/home/plone/my.project/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/tales.py", line 696, in evaluate
    return expression(self)
  File "/home/plone/my.project/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/expressions.py", line 217, in __call__
    return self._eval(econtext)
  File "/home/plone/my.project/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/expressions.py", line 194, in _eval
    ob = self._subexprs[-1](econtext)
  File "/home/plone/my.project/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/expressions.py", line 124, in _eval
    ob = self._traverser(ob, element, econtext)
  File "/home/plone/my.project/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/engine.py", line 66, in __call__
    request=request)
  File "/home/plone/my.project/eggs/zope.traversing-3.13.2-py2.7.egg/zope/traversing/adapters.py", line 136, in traversePathElement
    return traversable.traverse(nm, further_path)
  File "/home/plone/my.project/eggs/zope.traversing-3.13.2-py2.7.egg/zope/traversing/adapters.py", line 42, in traverse
    attr = getattr(subject, name, _marker)
  File "/home/plone/my.project/eggs/collective.nitf-2.0b1-py2.7.egg/collective/nitf/tiles/nitf.py", line 88, in date
    return api.portal.get_localized_time(date, long_format=True)
  File "<string>", line 2, in get_localized_time
  File "/home/plone/my.project/eggs/plone.api-1.3.2-py2.7.egg/plone/api/validation.py", line 67, in wrapped
    ", ".join(missing))
MissingParameterError: Missing required parameter(s): datetime
------
2016-03-07T16:58:21 ERROR plone.transformchain Unexpected error whilst trying to apply transform chain
Traceback (most recent call last):
  File "/home/plone/my.project/eggs/plone.transformchain-1.0.4-py2.7.egg/plone/transformchain/transformer.py", line 48, in __call__
    newResult = handler.transformIterable(result, encoding)
  File "/home/plone/my.project/eggs/plone.app.blocks-2.2.0-py2.7.egg/plone/app/blocks/transform.py", line 166, in transformIterable
    result.tree = tiles.renderTiles(self.request, result.tree)
  File "/home/plone/my.project/eggs/plone.app.blocks-2.2.0-py2.7.egg/plone/app/blocks/tiles.py", line 53, in renderTiles
    tileTree = utils.resolve(tileHref)
  File "/home/plone/my.project/eggs/plone.app.blocks-2.2.0-py2.7.egg/plone/app/blocks/utils.py", line 63, in resolve
    resolved = resolveResource(url)
  File "/home/plone/my.project/eggs/plone.app.blocks-2.2.0-py2.7.egg/plone/app/blocks/utils.py", line 103, in resolveResource
    raise RuntimeError(resolved)
RuntimeError:   <h2>Site Error</h2>
  <p>An error was encountered while publishing this resource.
  </p>
  <p><strong><class 'plone.api.exc.MissingParameterError'></strong></p>

  Sorry, a site error occurred.<p><p>Traceback (innermost last):</p>
<ul>

<li>  Module plone.subrequest, line 136, in subrequest</li>

<li>  Module ZPublisher.mapply, line 78, in mapply</li>

<li>  Module plone.tiles.esi, line 59, in __call__</li>

<li>  Module zope.browserpage.viewpagetemplatefile, line 83, in __call__</li>

<li>  Module zope.browserpage.viewpagetemplatefile, line 51, in __call__</li>

<li>  Module zope.pagetemplate.pagetemplate, line 132, in pt_render</li>

<li>  Module zope.pagetemplate.pagetemplate, line 240, in __call__</li>

<li>  Module zope.tal.talinterpreter, line 271, in __call__</li>

<li>  Module zope.tal.talinterpreter, line 343, in interpret</li>

<li>  Module zope.tal.talinterpreter, line 852, in do_condition</li>

<li>  Module zope.tal.talinterpreter, line 343, in interpret</li>

<li>  Module zope.tal.talinterpreter, line 821, in do_loop_tal</li>

<li>  Module zope.tal.talinterpreter, line 343, in interpret</li>

<li>  Module zope.tal.talinterpreter, line 533, in do_optTag_tal</li>

<li>  Module zope.tal.talinterpreter, line 518, in do_optTag</li>

<li>  Module zope.tal.talinterpreter, line 513, in no_tag</li>

<li>  Module zope.tal.talinterpreter, line 343, in interpret</li>

<li>  Module zope.tal.talinterpreter, line 852, in do_condition</li>

<li>  Module zope.tal.talinterpreter, line 343, in interpret</li>

<li>  Module zope.tal.talinterpreter, line 533, in do_optTag_tal</li>

<li>  Module zope.tal.talinterpreter, line 518, in do_optTag</li>

<li>  Module zope.tal.talinterpreter, line 513, in no_tag</li>

<li>  Module zope.tal.talinterpreter, line 343, in interpret</li>

<li>  Module zope.tal.talinterpreter, line 620, in do_insertText_tal</li>

<li>  Module zope.tales.tales, line 704, in evaluateText</li>

<li>  Module zope.tales.tales, line 696, in evaluate<br />
<b>URL: /home/plone/my.project/eggs/collective.nitf-2.0b1-py2.7.egg/collective/nitf/tiles/nitf.pt</b><br />
<b>Line 55, Column 8</b><br />
<b>Expression: &lt;PathExpr standard:u'view/date'&gt;</b><br />
<b>Names:</b><pre>{'args': (),
 'context': &lt;Cover at /pt-br/capa-estreia&gt;,
 'default': &lt;object object at 0x7ff7f484b500&gt;,
 'loop': {},
 'nothing': None,
 'options': {},
 'repeat': {},
 'request': &lt;HTTPRequest, URL=http://www.example.com/frontpage/@@collective.nitf/cbfd54db0600467b9e7511df95a499df&gt;,
 'template': &lt;zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile object at 0x7ff7d4f3a210&gt;,
 'view': &lt;Products.Five.metaclass.NITFTile object at 0x7ff7b82fe050&gt;,
 'views': &lt;zope.browserpage.viewpagetemplatefile.ViewMapper object at 0x7ff7d55c4f10&gt;}</pre></li>

<li>  Module zope.tales.expressions, line 217, in __call__</li>

<li>  Module zope.tales.expressions, line 194, in _eval</li>

<li>  Module zope.tales.expressions, line 124, in _eval</li>

<li>  Module zope.pagetemplate.engine, line 66, in __call__</li>

<li>  Module zope.traversing.adapters, line 136, in traversePathElement<br />
__traceback_info__: (&lt;Products.Five.metaclass.NITFTile object at 0x7ff7b82fe050&gt;, 'date')</li>

<li>  Module zope.traversing.adapters, line 42, in traverse<br />
__traceback_info__: (&lt;Products.Five.metaclass.NITFTile object at 0x7ff7b82fe050&gt;, 'date', [])</li>

<li>  Module collective.nitf.tiles.nitf, line 88, in date</li>

<li>  Module plone.api.portal, line 2, in get_localized_time</li>

<li>  Module plone.api.validation, line 67, in wrapped</li>

</ul><p>MissingParameterError: Missing required parameter(s): datetime
</p></p>
  <hr noshade="noshade"/>

  <p>Troubleshooting Suggestions</p>

  <ul>
  <li>The URL may be incorrect.</li>
  <li>The parameters passed to this resource may be incorrect.</li>
  <li>A resource that this resource relies on may be
      encountering an error.</li>
  </ul>

  <p>For more detailed information about the error, please
  refer to the error log.
  </p>

  <p>If the error persists please contact the site maintainer.
  Thank you for your patience.
  </p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants