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

Customization breaks event_summary in portal_view_customizations #1702

Closed
milarepa12 opened this issue Aug 2, 2016 · 3 comments
Closed

Customization breaks event_summary in portal_view_customizations #1702

milarepa12 opened this issue Aug 2, 2016 · 3 comments

Comments

@milarepa12
Copy link

milarepa12 commented Aug 2, 2016

Tested on Plone 5.0.4 and 5.0.5.

To reproduce the error:

  1. create a new plone site
  2. in this site, add an event (I've called it "Past")
  3. in the ZMI, go to portal_view_customizations
  4. search event_summary (plone.app.event.interfaces.IBrowserLayer)
  5. click on event_summary and "Customize" it
  6. just "Save changes"
  7. back to your plone site, try to view the event you've created at item 2

I get:

ERROR Zope.SiteErrorLog 1470144216.440.213231458087 http://localhost:8080/Plone/past/event_view
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 plone.app.event.browser.event_view, line 18, in __call__
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 163, in render
  Module chameleon.zpt.template, line 261, in render
  Module chameleon.template, line 171, in render
  Module f96edca220f76c0ae6944921d067275c.py, line 474, in render
  Module 07b5d5b9213de53d965b7204510f07a1.py, line 1223, in render_master
  Module 07b5d5b9213de53d965b7204510f07a1.py, line 420, in render_content
  Module f96edca220f76c0ae6944921d067275c.py, line 462, in __fill_content_core
  Module f96edca220f76c0ae6944921d067275c.py, line 320, in render_content_core
  Module five.pt.expressions, line 161, in __call__
  Module five.customerize.zpt, line 83, in __call__
  Module Products.PageTemplates.ZopePageTemplate, line 338, in _exec
  Module Products.PageTemplates.ZopePageTemplate, line 435, in pt_render
  Module Products.PageTemplates.PageTemplate, line 87, in pt_render
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 163, in render
  Module chameleon.zpt.template, line 261, in render
  Module chameleon.template, line 191, in render
  Module chameleon.template, line 171, in render
  Module 52d7c8034d38062cdfdcfe99e77b5a43.py, line 383, in render
TypeError: 'NoneType' object is not callable

 - Expression: "context/@@event_summary"
 - Filename:   ... t-2.0.10-py2.7.egg/plone/app/event/browser/event_view.pt
 - Location:   (line 24: col 41)
 - Source:     ... ry replace="structure context/@@event_summary"/>
                                         ^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "python:data.start.tzinfo.utcoffset(data.start)"
 - Filename:   ... stomizations/plone.event.interfaces.ievent-event_summary
 - Location:   (line 34: col 36)
 - Arguments:  repeat: {...} (0)
               template: <ImplicitAcquisitionWrapper plone.event.interfaces.ievent-event_summary at 0x7f04991ad320>
               modules: <instance - at 0x7f04a0203170>
               here: <ImplicitAcquisitionWrapper past at 0x7f049a291e10>
               user: <ImplicitAcquisitionWrapper - at 0x7f049a291af0>
               nothing: <NoneType - at 0x937be0>
               data: <EventAccessor None at 0x7f0495ff0e50>
               target_language: <NoneType - at 0x937be0>
               start_tzname: Europe/Berlin
               excludes: <list - at 0x7f0496c2f5f0>
               container: <ImplicitAcquisitionWrapper portal_view_customizations at 0x7f049a231460>
               default: <object - at 0x7f04a7bad540>
               request: <instance - at 0x7f0496409998>
               wrapped_repeat: <SafeMapping - at 0x7f0496c88310>
               loop: {...} (0)
               context: <ImplicitAcquisitionWrapper past at 0x7f049a291e10>
               translate: <function translate at 0x7f0497eee578>
               root: <Application Zope at 0x7f049a693de8>
               options: {...} (1)
               view: <TTWView None at 0x7f0495ff0c50>

NOTE: after deleting the entry in "portal_view_customizations -> Contents" you can display the (uncustomized) event content again

Regards
Norbert

@davilima6
Copy link
Member

davilima6 commented Aug 2, 2016

Same issue as #1632 (comment) <-- probably because of some python: expressions in the template.

Bottomline is you can't use portal_view_customizations for most of the items it proposes to be able to allow customize. I suggested adding a developer warning to that screen but didn't actually made the PR. Please comment it there if you agree or suggest a better text if you like.

@milarepa12
Copy link
Author

Ok, I've read issue #1632.
There are 16 python: expressions in event_summary. I'll have to find another way to customize the event layout. With a deprecation warning, I would have saved many hours searching and testing different versions. I support your developer warning suggestion.

@jensens
Copy link
Member

jensens commented Mar 13, 2023

I close the issue, because it addresses a Plone version that is no longer supported.
If you think this is wrong please reopen the issue and assign a matching milestone.

@jensens jensens closed this as completed Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants