Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Tips / Versioning

Versioning

啟用內容的版本管理功能後,可以查詢文件修改的歷史記錄,比對不同時期的內容差異。

原則上 Folderish 型別都不能啟用 Versioning 完整功能,頂多記錄 Create / Publish - admin on Aug 28, 2012 11:36 AM 之類的資訊。Page 之類的型別,可以記錄版本對照的資訊。

Understanding CMFEditions 舊版只提供 API 但沒有管理介面,造成刪除物件時,並不會一併清除版本記錄,在 Plone 5.x 之後改為預設會刪除

版本管理的功能以 CMF 為基礎,至少有三個相關模組: plone.app.versioningbehavior collective.cmfeditionsdexteritycompat collective.dexteritydiff

Archetypes 與 Dexterity 的 relation 早期使用不同的 UID 機制

Both Products.CMFEditions and Products.CMFUid define a Generic Setup default profile with a catalog step (catalog.xml) that creates the cmf_uid index. However, every time one of these products gets reinstalled, the index is recreated and its contents are lost. Products.GenericSetup 1.7.4 onwards should handle this issue.

Set UID for Dexterity 刪除 Annotation

    repo_tool = getToolByName(obj, "portal_repository")
    if not repo_tool.isVersionable(obj):
        return
    history = repo_tool.getHistoryMetadata(obj)
    if not history:
        return       
    length = history.getLength(countPurged=False)
    for i in xrange(length - 1, -1, -1):
        try:
            version = repo_tool.retrieve(obj, i)
            annotations = IAnnotations(version.object)
            del annotations[KEY_TO_DELETE]
        except POSKeyError:
            pass

ImageField, AttributeStorage, and Maximum Recursion Depth Error maxNumberOfVersionsToKeep

ATFieldProperty

Versioning History for All Members

Versioning does not work for fields using AnnotationStorage on folderish types

CMFEditions Comparison between Revisions for Custom Type

isObjectChanged isObjectVersioned

File Type: Known Issue Custom Content Types

Dexterity Content Types: StackOverflow

the method for diff_type lookup is limited

Working Copy Support Makes ZODB Bloat? Empty Blob Files: collective.cover

Allow Disabling Versioning per Content Item

Purging

Purging All Old Versions

ZODB strip versions

deleted item

Import / Export

Dexterity Behavior Migration

Access Attributes of the Fields from a Behavior

Dexterity Content Type with Working Copy Iterate and Workflow

create new temple, fill in Title DataSrc Coordinate one RichWidget.

Modify data_src from AnnotationStorage to AttributeStorage

  Module zope.tales.tales, line 696, in evaluate
   - URL: file:/home/marr/plone/buildout-cache/eggs/Products.Archetypes-1.8-py2.7.egg/Products/Archetypes/skins/archetypes/widgets/field.pt
   - Line 64, Column 4
   - Expression: PythonExpr getMethod and getMethod()
   - Name:
      {'container': PloneSite at /mysite,
       'context': Temple at /mysite/temples/TaipeiCity/nangang/my-temple,
       'default': object object at 0xb74cf7e0,

  Module Products.Archetypes.Field, line 713, in get
   - __traceback_info__: ('data_src', Temple at my-temple, {'field': Field data_src(string:rw)})
RuntimeError: maximum recursion depth exceeded
Related content
Security and Workflow