How to customize event_listing?

After customizing event_listing via portal_view_customizations the event_listing view throws:

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 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 93, 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 ccd06c0730d715e6fe00dc2a2593ee7a.py, line 1646, in render
  Module 769fead78899475fddb104e3b8d4f678.py, line 1223, in render_master
  Module 769fead78899475fddb104e3b8d4f678.py, line 420, in render_content
  Module ccd06c0730d715e6fe00dc2a2593ee7a.py, line 1634, in __fill_content_core
  Module ccd06c0730d715e6fe00dc2a2593ee7a.py, line 167, in render_content_core
TypeError: 'NoneType' object is not callable

 - Expression: "python:view.date_speller(data.start)"
 - Filename:   ... ew_customizations/zope.interface.interface-event_listing
 - Location:   (line 47: col 29)
 - Arguments:  repeat: {...} (0)
               template: <ImplicitAcquisitionWrapper zope.interface.interface-event_listing at 0x7f2b4e6bce60>
               modules: <instance - at 0x7f2b5d766cb0>
               here: <ImplicitAcquisitionWrapper link-f at 0x7f2b4e6bc8c0>
               user: <ImplicitAcquisitionWrapper - at 0x7f2b448ed9b0>
               nothing: <NoneType - at 0x7ab150>
               target_language: <NoneType - at 0x7ab150>
               translate: <function translate at 0x7f2b44572668>
               container: <ImplicitAcquisitionWrapper portal_view_customizations at 0x7f2b4456d820>
               default: <object - at 0x7f2b68106be0>
               request: <instance - at 0x7f2b4e703680>
               wrapped_repeat: <SafeMapping - at 0x7f2b454904c8>
               loop: {...} (1)
               context: <ImplicitAcquisitionWrapper link-f at 0x7f2b4e6bc8c0>
               root: <Application Zope at 0x7f2b559bb320>
               options: {...} (1)
               view: <TTWView None at 0x7f2b44707b10>

Is there an other (better) way to chance this template TTW?

Background: I just want to chance the order of month, day and date in the cal_date div from

<div class="cal_date">
            <span class="cal_month" tal:content="string:${startf/month_name}">Oct.</span>
            <span class="cal_day" tal:content="string:${startf/day}">15</span>
            <span class="cal_wkday" tal:content="python:startf['wkday_name']">Tue</span>
</div>

to

<div class="cal_date">
            <span class="cal_wkday" tal:content="python:startf['wkday_name']">Tue</span>
            <span class="cal_day" tal:content="string:${startf/day}">15</span>
            <span class="cal_month" tal:content="string:${startf/month_name}">Oct.</span>
</div>

I would install collective.jbot

If you REALLY need to do it TTW, try this:

  1. Customize it TTW in portal_view_customization
  2. Check your view (before doing ANY changes to it).

Some templates gives error even if you dont do any changes, in that case you probably have to do it with Jbot or by overriding it in you theme / product.

Dear Espen, thankĀ“s for your adwise.

but:

  1. Customize it TTW in portal_view_customization

was what I try to do.

  1. Check your view (before doing ANY changes to it).

Yeahh I changed nothing.

Some templates gives error even if you dont do any changes,

event_listing seems to be one of theme?

in that case you probably have to do it with Jbot

Sorry, I forgot to mention that we are using Plone5.

So, question now thems to be: why is it imposible to customize event_listing in the documented way via portal_view_customization?

Don't rely on portal_view_customizations, it's broken since inception for some templates. Especially those that contain more Python code than it should, as it we can see from this commit and comment by @mauritsvanrees:

Maybe we can refactor the event_listing template so it doesn't err anymore, moving more logic to its controller, e.g. https://github.com/plone/plone.app.event/blob/f0a8bafaa052d92e757fa36825c7d33b6975847e/plone/app/event/browser/event_listing.pt#L57