#7 — Linguaplone references lost
by
(anonymous)
—
last modified
Jul 09, 2009 03:33 PM
| State | Resolved |
|---|---|
| Version: | |
| Area | Functionality |
| Issue type | Bug |
| Severity | Critical |
| Submitted by | (anonymous) |
| Submitted on | Jan 27, 2006 |
| Responsible | Dorneles Tremea |
| Target release: |
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
Added by
Peter Nilsson
on
Feb 08, 2006 10:46 AM
This sounds like a problem we have had on our site. We seem to have lost Linguaplone references for some of our custom content types and until now I had no idea why.
Severity:
Critical
→
Medium
Target release:
1.0
→
None
Responsible manager:
deo
→
(UNASSIGNED)
Our configuration:
Zope 2.7.8-final
Python 2.3.5
System Platform linux2
Archetypes 1.3.5-final
Linguaplone 0.9.0 Beta - r4895
Plone 2.1.1
Added by
(anonymous)
on
Feb 14, 2006 06:26 PM
Hi i have the same problems and i think the reason is that the update schema tool does a "create-copy" update. First ist creates a new object for your type and then it inserts the values from the old one into it and later renames the new oe after delting the old one. unfortunally the whole "is translation of" archetype ref's are not updated. At least that is what i think is going on.
as nobody in the malinglists had any help for me i just stoped using update schema. if you edit an old object new fields are ready to be used anyway. you just have to make shure to check in your programm logic if the fields are pressent in the current object and if not output some default value.
ciao markus
mk@zgdv.de
Added by
Robert Andersson
on
Apr 07, 2006 01:20 PM
we have experienced the same problem att our site. using plone 2.1.2, zope 2.7.8, python 2.3.5.yours,
/robert
Added by
(anonymous)
on
Apr 07, 2006 05:45 PM
This should probably be reported in the plone tracker, as there are no "LinguaPlone references" - it uses Archetypes references, so if you lost the translation reference, you have most likely lost all references in your site.
Added by
Alex Limi
on
Jun 17, 2006 06:25 AM
Leaving for deo to comment.
Issue state:
unconfirmed
→
open
Target release:
None
→
1.0
Responsible manager:
(UNASSIGNED)
→
deo
Added by
Alex Limi
on
Jun 28, 2006 02:03 PM
Issue state:
postponed
→
open
Added by
Harald Friessnegger
on
Oct 05, 2006 09:43 AM
i could apply the patch to revision 9516 (somehere between the 0.9.0 beta and 0.9 final releases)and can confirm that it solved the problem of lost references.
thank you sooooo much andreas!
Added by
Alex Limi
on
Oct 05, 2006 05:18 PM
Since this seems to be working for people, I'm escalating it. We should get a new release out in time for the Conference. :)
Issue state:
postponed
→
in-progress
Severity:
Medium
→
Critical
Added by
Harald Friessnegger
on
Apr 05, 2007 02:46 PM
is there any reason not to include this in trunk?
Added by
Wichert Akkerman
on
Jun 14, 2007 10:34 AM
The patch has not been merged yet since it is lacking proper tests. I'll try to write a proper test and merge this soon.
Added by
Wichert Akkerman
on
Jun 19, 2007 02:33 PM
A test and a fix for those issue have been committed to svn and will be included in the upcoming 1.0 release.
Issue state:
in-progress
→
resolved
No responses can be added.
If you can, please log in before submitting a reaction.
