More about CalCMF AttributeError

"Morten W. Petersen" <[email protected]>
Newsgroups gmane.comp.web.zope.cps.devel
Message-ID <[email protected]>
Hi,

still working on that AttributeError: getPhysicalPath bug I'm
encountering in CalCMF.

The problem seems to be that due to some magical Five traversal, some
places a calcmf calendar instance's parent can be an instance of
Products.Five.metaclass.SimpleViewClass.

The bug isn't visible on home calendars, because self._attendee_name !=
'' doesn't evaluate to true.

On calendars created elsewhere the bug is visible, and the statement
self._attendee_name = '/'.join(self.getPhysicalPath()) fails because
self in this case is a CmfCalendar instance with the acquisitional
parent Products.Five.metaclass.SimpleViewClass..

You can see what I'm talking about by adding

  print 'calendar is', calendar, calendar.aq_parent

at line line 172 of CalZope/browser/calview.py - it says

calendar is <CmfCalendar at calendar>
<Products.Five.metaclass.SimpleViewClass from
/home/morphex/CalCMF/CalZope/browser/week.pt object at 0xb4ec7a2c>

on a working "home folder" calendar..  I see two ways of fixing this;
either changing the if self._attendee_name == '': code in
CalCMF/calendar.py or by fixing the traversal.  What do you think?

-Morten

-Morten
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.