#7 — Linguaplone references lost
| State | Resolved |
|---|---|
| Version: | 0.9 |
| Area | Functionality |
| Issue type | Bug |
| Severity | Critical |
| Submitted by | (anonymous) |
| Submitted on | Jan 27, 2006 |
| Responsible | Dorneles Tremea |
| Target release: | 1.0 |
Last modified on
Dec 30, 2008
by
David Glick
The error occured during Update Schema (archetypes_tool) on a custom AT content type.
After updateing the schema, all Linguaplone references are lost.
The same behaviour seems to apply to the build in ATDocument .
Environment:
Archetypes 1.3.7-final
Zope 2.7.8-final
Plone 2.1.2
Python 2.3.5
Windows XP
My content type:
from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *
try:
from Products.LinguaPlone.public import *
except ImportError:
HAS_LINGUAPLONE = False
else:
HAS_LINGUAPLONE = True
from Products.Employee.config import *
schema=Schema((
StringField('id',
widget=StringWidget
(
label="id",
description="lastname_firstname (lower case letters only!)",
label_msgid='Employee_label_id',
description_msgid='Employee_help_id',
i18n_domain='Employee',
),
required=1,
searchable=1
),
StringField('title',
widget=StringWidget
(
label="Title",
description="Lastname, Firstname",
label_msgid='Employee_label_title',
description_msgid='Employee_help_title',
i18n_domain='Employee',
),
languageindependent="1",
searchable=1,
required=1
),
StringField('Position',
index="FieldIndex",
widget=StringWidget
(
label="Position",
description="For example Division Head, Secretary, etc",
label_msgid='Employee_label_Position',
description_msgid='Employee_help_Position',
i18n_domain='Employee',
),
required=0,
searchable=1
),
StringField('MobileNumber',
widget=StringWidget
(
label="Mobile number",
label_msgid='Employee_label_MobileNumber',
description_msgid='Employee_help_MobileNumber',
i18n_domain='Employee',
),
languageindependent="1",
searchable=1,
required=0
),
),
)
Employee_schema = BaseSchema + \
schema
class Employee(BaseContent):
security = ClassSecurityInfo()
__implements__ = (getattr(BaseContent,'__implements__',()),)
# This name appears in the 'add' box
archetype_name = 'Employee'
meta_type = 'Employee'
portal_type = 'Employee'
allowed_content_types = []
filter_content_types = 0
global_allow = 1
allow_discussion = 0
#content_icon = 'Employee.gif'
immediate_view = 'base_view'
default_view = 'base_view'
suppl_views = ()
typeDescription = "Employee"
typeDescMsgId = 'description_edit_employee'
schema = Employee_schema
security.declarePublic('Title')
def Title(self):
"""
"""
return self.getTitle()
registerType(Employee,PROJECTNAME)
- Steps to reproduce:
- select archetype_tool
Update the following classes: myclass
Update: All objects
Add response
If you can, please log in before submitting a reaction.