Hi,
I have a problem in plone 4.1 when searching for dexterity objects with
empty description fields (I explicitly added the title and description field
as per the manual). This was reported in plone.dexterity issue 179 and fixed
in r49792 by changing the Description accessor in content.py:
@@ -228,7 +228,7 @@
# this is a CMF-style accessor, so should return utf8-encoded
if isinstance(self.description, unicode):
return self.description.encode('utf8')
- return self.description
+ return self.description or ''
I put a pdb in that method but it doesn't get called when viewing or editing
my object. Hence the catalog record has a description of None. If I add an
accessor in my class with the same code above, the catalog record's
description is empty (as opposed to None) and the search works. I also tried
removing the title and description from the schema and added the basic
metadata behaviour and that obviously also worked.
Using the basic metadata behaviour will work for some of my types but one of
my types doesn't need a description and the title on another optional. Any
thoughts on how I should proceed?
Thanks
Mike
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers