Philip Bauer wrote:
Hi all,

i have a problem with languageIndependent fields.
My ContentType "staffmember" has a

the value of languageIdependent fields is not changed after the canonical field is changed.

I have a ContentType called StaffMember and for example an StringField 'email'

    atapi.StringField(
        name='email',
        required=False,
        searchable=False,
        languageIndependent=True,
        validators = ('isEmail',),
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Email"),
            label_msgid='staffmember_label_email',
            description=_(u""),
            description_msgid='staffmember_help_email',
        ),
    ),

Since email doesn't change when translating (compared to jobTitle or such) it's marked as langageIndependent. When I translate that person, the 'email'-value of the canonical version is kept - so far so good. But when I change the value in the canoical version after translating (imagine this persons email changed because he changed his department) the original value is kept in the translated version - with no chance for me to override or sync it again. As far as i see this only happens to text- and stringfields, files and images are not affected.

Am i missing something or is it a bug?

I use:
Plone 3.2.1
Zope (Zope 2.10.6-final, python 2.4.4, darwin)
Python 2.4.4
LinguaPlone 2.4
Archetypes 1.5.10-dev
ATVocabularyManager 1.5-alpha


Regards,
Philip



*************
Philip Bauer
Adlzreiterstr. 37
80337 München
Tel: 089 - 57 08 56 85
Mobil: 0176 - 23 55 05 05
[email protected]
www.starzel.de

Hi Philip,

we had a very similar problem. Could it be that the value _does_ get written to the translation when you edit the canonical, but that you just don't see it, because the translation didn't get reindexed?

In other words, if you edit the canonical and change the email, then edit the translation (to trigger the reindexing), do you then see the updated value?

For this usecase we introduced a checkbox-Field "reindexTranslations" to several of the content types we use. The person editing a canonical object can tick this box to indicate that reindexing should be done. An event-handler for zope.lifecycleevent.interfaces.IObjectModifiedEvent then checks if the property is set, and if so, it reindexes all translations and unsets the property again.

Of course you could just reindex all translations of an object automatically every time you save, but that will introduce some extra waiting time for the editor...

Or is your problem different, i.e. the value does not get propagated to translations at all?


Cheers,
Wolfgang




_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to