isawnyu / pleiades-gazetteer

This repository provides a home for tickets and other planning documents for the Pleiades gazetteer of ancient places. Code is kept in multiple other repositories.
https://pleiades.stoa.org
11 stars 0 forks source link

some place views are throwing an error on connection listing construction #331

Closed paregorios closed 6 years ago

paregorios commented 6 years ago

User reported error.

The problem may be with incomplete connections (i.e., those without targets). The error is occuring in trying to get the title of the target (referenced) place resource while constructing the connections listing. Miletus is an example:

Traceback (innermost last):

    Module ZPublisher.Publish, line 138, in publish
    Module ZPublisher.mapply, line 77, in mapply
    Module ZPublisher.Publish, line 48, in call_object
    Module Shared.DC.Scripts.Bindings, line 322, in __call__
    Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
    Module Products.CMFCore.FSPageTemplate, line 237, in _exec
    Module Products.CMFCore.FSPageTemplate, line 177, in pt_render
    Module Products.PageTemplates.PageTemplate, line 87, in pt_render
    Module zope.pagetemplate.pagetemplate, line 132, in pt_render
    Warning: Macro expansion failed
    Warning: <type 'exceptions.KeyError'>: 'macro'
    Module zope.pagetemplate.pagetemplate, line 240, in __call__
    Module collective.newrelic.patches.talinterpreter, line 17, in monkeypatch
    Module newrelic.api.function_trace, line 110, in literal_wrapper
    Module zope.tal.talinterpreter, line 271, in __call__
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 954, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 858, in do_defineMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 954, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 954, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 946, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 858, in do_defineMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 852, in do_condition
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 531, in do_optTag_tal
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
    Module Products.PageTemplates.Expressions, line 218, in evaluateStructure
    Module zope.tales.tales, line 696, in evaluate
    URL: file:/srv/python27-apps/pleiades4/src/Products.PleiadesEntity/Products/PleiadesEntity/skins/PleiadesEntity/place_view.pt
    Line 185, Column 12
    Expression: <PathExpr standard:u'context/@@connections-listing|nothing'>
    Names:

    {'container': <Place at /plone/places/599799>,
     'context': <Place at /plone/places/599799>,
     'default': <object object at 0x7f90763a4bc0>,
     'here': <Place at /plone/places/599799>,
     'loop': {},
     'nothing': None,
     'options': {'args': ()},
     'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7f9029062af8>,
     'request': <HTTPRequest, URL=https://pleiades.stoa.org/places/599799/base_view>,
     'root': <Application at >,
     'template': <FSPageTemplate at /plone/places/599799/base_view>,
     'traverse_subpath': [],
     'user': <PloneUser 'thomase'>}

    Module zope.tales.expressions, line 217, in __call__
    Module Products.PageTemplates.Expressions, line 155, in _eval
    Module Products.PageTemplates.Expressions, line 117, in render
    Module Products.PleiadesEntity.browser.attestations, line 127, in __call__
    Module Products.PleiadesEntity.browser.attestations, line 461, in rows
    Module Products.PleiadesEntity.browser.attestations, line 415, in predicate_phrase

AttributeError: 'NoneType' object has no attribute 'Title' 
paregorios commented 6 years ago

Now in work in https://github.com/isawnyu/PleiadesEntity/tree/issue331

paregorios commented 6 years ago

There are copies of two of the connections present and these seem to be causing part of the problem.

paregorios commented 6 years ago

The fix has been deployed and the web application restarted. We are verifying reported problems have cleared.