CMFCalendar - search in portal_catalog failed after localisation of portal_types
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope CMF buildout |
Invalid
|
Medium
|
Unassigned |
Bug Description
To localize portal_types I update all 'Type' properties with the french translation. After that, the calendar don't find new events.
I trace the culprit and discover that in CalendarTool, the search on portal_catalog use the 'Type' property. I patch it to use the 'meta_type' property and update www/configureCa
Maybe useful for further release...
Patch:
--- CalendarTool.
+++ CalendarTool.py Sun Feb 23 14:54:55 2003
@@ -49,7 +49,7 @@
def __init__(self):
- self.calendar_types = ['Event']
+ self.calendar_types = ['CMF Event']
security.
@@ -129,7 +129,7 @@
- query=self.
+ query=self.
@@ -142,7 +142,7 @@
# but I don't know how to do that in one search query :( - AD
# if you look at calendar_slot you can see how to do this in 1 query - runyaga
- query+=
+ query+=
@@ -208,19 +208,19 @@
# Get all events that Start on this day
- query=self.
+ query=self.
# Get all events that End on this day
- query+=
+ query+=
# Get all events that Start before this day AND End after this day
- query+=
+ query+=
--- www/configureCa
+++ www/configureCa
@@ -9,17 +9,17 @@
<h3>Portal Types to show in the calendar</h3>
<select name="show_
- <tal:types tal:repeat="type here/portal_
+ <tal:types tal:repeat="type here/portal_
<option value="#"
- tal:attributes=
- tal:content="type"
- tal:condition=
+ tal:attributes=
+ tal:content=
+ tal:condition=
<option value="#" selected
- tal:attributes=
- tal:content="type"
- tal:condition=
+ tal:attributes=
+ tal:content=
+ tal:condition=
</tal:types>
Status: Pending => Rejected
This has already been fixed in CVS, see cvs.zope. org/CMF/ CMFCalendar/ CalendarTool. py.diff? r1=1.5& r2=1.6
http://
Furthermore, your fix was not correct: the correct way to do type
differentiation in CMF is to use portal_type, not meta_type.