Thanks, I've finally backported some fixes for StorageAdapter, which was overwriting too many fields during a document update.

Christophe

Racinet Georges a écrit :
Hi Christophe,

working on CPS these days ? Nice :-)

On May 7, 2009, at 10:34 PM, Christophe Combelles wrote:

I've found that this issue does not occur on CPS 3.4.8 / Zope 2.9.10

I've fixed a bunch of problems whith DiskFile a while ago; that would be indeed between those versions. This cloning story definitely rings a bell, but it's been a long time... You should be able to find the related tickets there: http://svn.nuxeo.org/trac/pub (component: CPSSchemas).

If you have the possibility to upgrade to 3.4.8, you should definitely do it. Otherwise, DiskFile.py being fairly independent from the rest of CPSSchemas, it should be quite safe to simply plug the current one into the version of CPSSchemas that you're running (especially since there are lots of unit tests).

In general, beware also that DiskFile still has a few drawbacks: transactional support is still poor, although I don't remember the exact problems that are left, file serving is slow and memory consuming, cloning is a true copy on the FS. I've been using CPSTramline for a while instead (not that it doesn't have any problems, mind you).

Cheers


Christophe Combelles a écrit :
Hi
I'm having the following problem with CPS 3.4.2:
- in the portal_schemas, for the File (CPS Document) schema, replace File with DiskFile. - create a File (CPS Document) object in the workspace and upload a file in it
- publish the document into the section
Now:
- modify the filename of the attached file in the workspace side or edit or upload a new file. Problem : The modification is reflected in the section, although it should not. The published object is a new revision and is supposed to be distinct from the one in the workspace.

Nitpicking: not exactly a new revision, rather a frozen one. The modification after publication should create a new revision.

This issue can even lead to data loss.
I've understood that the contained object (the DiskFile) is not cloned and the two CPSDocument objects (the one in the section and the one in the workspace) contain the same DiskFile object. I'm not sure I fully understand why it is not cloned. The '_object' attribute of the proxy (which contains the contained objects) is not serialized. So it's value is always an empty tuple. the manageAfterClone code tries to iterate over it, so it doesn't find anything, and does not clone the contained objects. Is there something wrong with what I'm saying, or is there a real problem?
Christophe
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

--
Georges Racinet, http://www.racinet.fr
Zope/CPS/Plone expertise, assistance & development
GPG: 0x4862FFF7







_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel



_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to