Personal tools
Contact Us 24/7 > 1 866.SIX FEET
Sections

Skip to content. | Skip to navigation

Home > Blog > CMF Diff Tool: the end of the mystery

Blog

CMF Diff Tool: the end of the mystery

written by Lucie Parker on Wednesday January 5, 2011
Comments | Filed under: ,

A while ago, while working on a Plone 3.3 site (which had been migrated from Plone 3.1.7), we realized that comparing different versions of an object on the "history" tab didn't show anything. So we went and looked at the CMF Diff Tool (portal_diff) in the zmi and saw that it was empty, when we would have thought that at least the basic Plone types would be handled.

CMF Diff Tool empty

We tested on a vanilla Plone 3.3 site and the CMF Diff Tool was NOT empty. Here is an example:

CMF Diff Tool example

We assumed somehow something made this settings disappear from the CMF Diff Tool and fixed it with an upgrade step:

from Products.CMFCore.utils import getToolByName


def rebuild_portal_diff(self):
    """For the given list of types, add the to the portal_diff tool
    as Compound Diff's
    """
    to_add = [
        'Document',
        'Event',
        'Favorite',
        'File',
        'Folder',
        'Image',
        'Link',
        'News Item',
    ]
    pdiff = getToolByName(self, 'portal_diff')
    for element in to_add:
        pdiff.manage_addDiffField(element, 'any', 'Compound Diff for AT types')

Today, one of our clients reported the same issue with a Plone 3.1.7 site. So the first reflex was to create a vanilla Plone 3.1.7 site to see how it was behaving: the CMF Diff Tool was empty. Then we migrated this vanilla site to Plone 3.3.5 and the CMF Diff Tool still was empty.

In the end, if you happen to have a site that was created before Plone 3.3, you'll have to add each type in the CMF Diff Tool if you want to be able to see differences between versions on the "history" tab of an object.

In the meantime, I reported the issue at https://dev.plone.org/plone/ticket/11389 .

 
Posted by Miquel on Mar 09, 2011 02:20 AM
At last I could find out why history was not working properly. Thanks a lot!
Add comment

You can add a comment by filling out the form below. Plain text formatting.

puzzle
Lucie Parker
Scheduler
Lucie's Recent Posts:
CMF Diff Tool: the end of the mystery (01/05/2011)
PSE2010 - DEXTERITY (06/22/2010)

Next Steps


Select a type of support:

Contact our sales team

First name:
Last name:
Email:
Phone Number:
Message:
Fight spam:
What is + ?
 
Call Us 1 866.SIX FEET
Sections