newsletter-stats.html with wrong URLs

Bug #571624 reported by Andreas Jung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Singing & Dancing
New
Undecided
Unassigned

Bug Description

For

http://www.genderkompetenz.info/aktuelles/Newsletter/aktueller-newsletter/genderkompetenzmail-04-2010

we choose "Send Newsletter".

In http://www.genderkompetenz.info/portal_newsletters/channels/newsletter-stats.html

we choose "Execute" for this particular newsletter which produces:

Traceback (innermost last):

    * Module ZPublisher.Publish, line 119, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 42, in call_object
    * Module plone.z3cform.layout, line 58, in __call__
    * Module Shared.DC.Scripts.Bindings, line 313, in __call__
    * Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
    * Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
    * Module Products.CacheSetup.patch_cmf, line 126, in PT_pt_render
    * Module zope.tal.talinterpreter, line 271, in __call__
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 891, in do_useMacro
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 536, in do_optTag_tal
    * Module zope.tal.talinterpreter, line 521, in do_optTag
    * Module zope.tal.talinterpreter, line 516, in no_tag
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 891, in do_useMacro
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 536, in do_optTag_tal
    * Module zope.tal.talinterpreter, line 521, in do_optTag
    * Module zope.tal.talinterpreter, line 516, in no_tag
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 949, in do_defineSlot
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 536, in do_optTag_tal
    * Module zope.tal.talinterpreter, line 521, in do_optTag
    * Module zope.tal.talinterpreter, line 516, in no_tag
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 957, in do_defineSlot
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 536, in do_optTag_tal
    * Module zope.tal.talinterpreter, line 521, in do_optTag
    * Module zope.tal.talinterpreter, line 516, in no_tag
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 891, in do_useMacro
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 957, in do_defineSlot
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 536, in do_optTag_tal
    * Module zope.tal.talinterpreter, line 521, in do_optTag
    * Module zope.tal.talinterpreter, line 516, in no_tag
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 949, in do_defineSlot
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 536, in do_optTag_tal
    * Module zope.tal.talinterpreter, line 521, in do_optTag
    * Module zope.tal.talinterpreter, line 516, in no_tag
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 949, in do_defineSlot
    * Module zope.tal.talinterpreter, line 346, in interpret
    * Module zope.tal.talinterpreter, line 586, in do_setLocal_tal
    * Module zope.tales.tales, line 696, in evaluate
      URL: controlpanel
      Line 10, Column 4
      Expression: <PathExpr standard:'view/contents'>
      Names:

      {'container': <ChannelContainer at /gkz/portal_newsletters/channels>,
       'context': <ChannelContainer at /gkz/portal_newsletters/channels>,
       'default': <object object at 0xb7cf3528>,
       'here': <ChannelContainer at /gkz/portal_newsletters/channels>,
       'loop': {},
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xabbdb6c>,
       'request': <HTTPRequest, URL=http://www.genderkompetenz.info/portal_newsletters/channels/newsletter-stats.html&gt;,
       'root': <Application at >,
       'template': <ImplicitAcquirerWrapper object at 0x168d48ec>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <Products.Five.metaclass.MyFormWrapper object at 0x114978ec>,
       'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper object at 0xf3092ec>}

    * Module zope.tales.expressions, line 217, in __call__
    * Module Products.PageTemplates.Expressions, line 163, in _eval
    * Module Products.PageTemplates.Expressions, line 125, in render
    * Module plone.z3cform.layout, line 67, in contents
    * Module plone.z3cform.layout, line 75, in render_form
    * Module z3c.form.form, line 189, in __call__
    * Module plone.z3cform.crud.crud, line 388, in update
    * Module plone.z3cform.crud.crud, line 232, in update
    * Module z3c.form.form, line 186, in update
    * Module z3c.form.action, line 99, in execute
    * Module z3c.form.button, line 302, in __call__
    * Module z3c.form.button, line 170, in __call__
    * Module collective.dancing.browser.stats, line 124, in handle_process_jobs
    * Module collective.singing.async, line 22, in process
    * Module collective.singing.async, line 37, in __call__
    * Module collective.dancing.browser.sendnewsletter, line 47, in _assemble_messages
    * Module OFS.Traversable, line 301, in restrictedTraverse
    * Module OFS.Traversable, line 269, in unrestrictedTraverse
      __traceback_info__: ([], 'genderkompetenzmail-04-2010')

AttributeError: genderkompetenzmail-04-2010

First approach was recataloging the whole site which did not help.

Debugging _assemble_messages() gives us this:

(Pdb) context_path
'/gkz/aktuelles/Newsletter/genderkompetenzmail-04-2010'

(Pdb) list
 43 override_vars = {}
 44 queued = 0
 45 site = getSite()
 46 request = site.REQUEST
 47 import pdb; pdb.set_trace()
 48 -> context = site.restrictedTraverse(context_path)
 49 for path in channel_paths:
 50 channel = site.restrictedTraverse(path)
 51 assembler = collective.singing.interfaces.IMessageAssemble(channel)
 52 queued += assembler(
 53 request, (FullFormatWrapper(context),), include_collector_items, override_vars)
(Pdb) print site
<PloneSite at gkz>
(Pdb) site.aktuelles
<ATFolder at /gkz/aktuelles>
(Pdb) site.aktuelles.Newsletter
<ATFolder at /gkz/aktuelles/Newsletter>
(Pdb) site.aktuelles.Newsletter.objectIds()
['abgelaufen', '10_2008', '01_2007', '05_2009', '08_2007', '09_2009', '07_2009', '11_2007', '04_2008', '12_2007', '04_2009', '01_2009', '12_2009', '06_2008', '06_2009', '07_2007', '11_2009', '01_2008', '10_2009', '06_2007', '02_2007', '02_2009', '11_2008', '05_2008', 'eingetragen', '04_2007', '08_2009', 'ausgetragen', '8_maerz', '12_2006', '12_2008', 'weihnachten_2008', '03_2009', '09_2007', 'index.html', '03_2008', '07_2008', '05_2007', '10_2007', '2008', '08_2008', '09_2008', '02_2008', '03_2007', '2007', 'genderkompetenzmail-2009', 'aktueller-newsletter']

So appearently the 'context_path' is completely wrong and does not reflect the location of the real location
under

http://www.genderkompetenz.info/aktuelles/Newsletter/aktueller-newsletter/genderkompetenzmail-04-2010

Wtf?

Revision history for this message
Daniel Nouri (daniel.nouri) wrote :

I suspect you moved the "genderkompetenzmail-04-2010" object after "Send Newsletter" and before "Execute". S&D saves the path to the object and not a UID or such.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.