Ticket #8480 (closed Bug: fixed)
renameAfterCreation breaks on portal_type with namespace '.' (dot)
|Reported by:||pbugni||Owned by:||dunlapm|
Using namespace conventions, a portal_type with a dotted name, such as 'namespace.contenttype' will not be renamed after creation (regardless of the value of _at_rename_after_creation. The problem is due to the assumptions made in CMFPlone.utils.isIDAutoGenerated()
This modification to CMFPlone/utils.py will fix the problem:
114c114 < if id.count('.') != 2: ---
if id.count('.') < 2:
122c122,125 < obj_type, date_created, random_number = id.split('.') ---
parts = id.split('.') random_number = parts.pop() date_created = parts.pop() obj_type = '.'.join(parts)
Given the move towards namespace packages, I would expect this will become a more common issue.
NB - This was originally reported on the zope-cmf tracker https://bugs.launchpad.net/bugs/268299 - re-filed here on request.