Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Tips / Versioning

Versioning

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

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

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

Related content
Security and Workflow