#24 — ATBlob is not fully LinguaPlone aware

by Wolfgang Thomas last modified Nov 04, 2009 11:39 PM
State Resolved
Version: 1.0b6
Area Functionality
Issue type Bug
Severity Medium
Submitted by Wolfgang Thomas
Submitted on Oct 24, 2009
Responsible Andreas Zeidler
Target release: 1.0
Hi, I'm missing LinguaPlone awareness for ATBlob in the current trunk (r30843) with regards to languageIndependent fields. Specifically, in plone/app/blob/context.py no attempt is made to check for LinguaPlone availability; rather "registerType" is imported from Archetypes.atapi

Result: the content of languageIndependent fields is not propagated to translations upon editing the canonical, since LinguaPlone's generateMethods magic has not happened for these fields.

Funnily, there are tests proving LinguaPlone support for blob-based content in the tests-dir, so I wonder why AT Blob itself doesn't do LP.

IMHO it should be sufficient to replace

from Products.Archetypes.atapi import registerType

with

try:
    from Products.LinguaPlone.public import registerType
except ImportError:
    from Products.Archetypes.atapi import registerType

since ATBlob's base class ATCTFileContent is already LP aware.

Would it be possible to modify content.py accordingly?
Steps to reproduce:
In a multilingual Plone 3 site, create an ATBlob object, and create a translation of it. Edit the original and change the Publicate Date (effectiveDate). Note that on the translation, the date has not been updated as it should have been.
Added by Andreas Zeidler on Oct 24, 2009 11:18 PM
Issue state: UnconfirmedConfirmed
Responsible manager: (UNASSIGNED)witsch
Target release: None1.0
hi wolfgang,

the lingua-related tests were written with regard to custom LP-aware content based on blobs. however, i never actually checked LP with the base content type itself, so thanks for the heads up! :)

i'll add your patch, of course, but will implement a few basic tests first — most likely during the plone conf sprint...
Added by Wolfgang Thomas on Oct 25, 2009 10:28 AM
Hi Andreas,

great to hear! :)

If you don't mind, I could join you at the sprint.
Added by Andreas Zeidler on Nov 04, 2009 11:39 PM
Issue state: ConfirmedResolved
hi wolfgang,

unfortunately i must have somehow missed your message, perhaps while and because of being in transition to ploneconf... :( you would have been most welcome to join, of course.

in any cause, marco has added a few tests to go along with your patch, and i've just committed his changes in http://dev.plone.org/plone/changeset/31101

thanks again for looking into this & the patch!

No responses can be added.