Skip to main content

Introduction

This package implements some magical improvements compared to the default plone copy/move/rename implementation.

As far as we manage to get changes in to Plone/CMFCore this packages is no longer necessary.

Lighting fast move/rename

This package provides a improved move/rename implementation. The more files you want to move the faster it will be compared to the default Plone implementation.

Basically it does not an uncatalog an afterwards a catalog of the obejct, but updates the indexed data where necessary. This saves us from reindexing the whole moved structure. The main issue was that the searchableText from Files was indexed again.

Example measurement with 1 Folder, which contains 1 Document and 300 Files (almost empty PDFs):

Plone: approx. 80s With this package: approx. 8s

PR for this change is open at: XXX (Add URL to PR)

Update modification date when moving

When building cache keys based on the modification dates of objects it is crucial that the modification dates are updated on any change. By default, the modification date is updated when the content is changed, which is not the case when moving objects around.

The “move”-patch in this package changes the behavior so that a “move” will also trigger a modification date update and thus give caches the chance to invalidate when they are built with the modification date and need to be invalidated when the path is updated.

Backport of dexterity patch: set copy flags

Problem:

When copying a DX container which has AT children, the UID of the AT children was not updated. The reason for the error is that the DX container copy did not have the _v_is_cp flag while the AT children were processed and thus the flag was not properly delegated.

Solution:

By copying the _v_is_cp and _v_cp_refs flags to the copy we have the same behavior as it used to be with AT, which does fix the error.

Fix inconsistent state:

Without this patch, copy / paste could lead to incosinstent state. When you’ve installed ftw.copymovepatches on an existing installation and encounter issues with your catalog consistency your best shot is to try and resolve them with ftw.catalogdoctor. See https://github.com/4teamwork/ftw.catalogdoctor/ for more information about how to install and run the package.

Compatibility

Plone 4.3.x

Installation

  • Add the package to your buildout configuration:

[instance]
eggs +=
    ...
    ftw.copymovepatches

Development

Python:

  1. Fork this repo

  2. Clone your fork

  3. Shell: ln -s development.cfg buidlout.cfg

  4. Shell: python boostrap.py

  5. Shell: bin/buildout

Run bin/test to test your changes.

Or start an instance by running bin/instance fg.

Changelog

2.0.0 (2019-07-15)

1.1.1 (2019-06-19)

  • Also reindex Date (which defaults to modified) when moving an object. [njohner]

  • Fixed error (issue 13) when renaming Plone Site. [maurits]

1.1.0 (2018-03-01)

  • Add support for Plone 5.1. [mbaechtold]

  • Add support for Products.CMFCore >= 2.2.11 [avoinea]

1.0.1 (2016-09-26)

  • ZCML: Include monkeypatcher before using it. [jone]

1.0.0 (2016-09-13)

  • Fix edge case with collective.indexing and other 3rd party packages and rename a nested structure. [mathias.leimgruber]

1.0.0a4 (2016-09-07)

  • Update modification date when moving an object. [jone]

1.0.0a3 (2016-09-07)

  • Make add-on more robust by handling a special case which may happen when “collective.indexing” is installed and an object is created with “plone.api” in a subscriber listening on “IObjectAddedEvent”. [mbaechtold, mathias.leimgruber]

1.0.0a2 (2016-09-05)

  • Implement delete. [mathias.leimgruber]

1.0.0a1 (2016-09-02)

  • Init Implementation. [jone & mathias.leimgruber]

  • Package generated using bobtemplates.4teamwork

Release files for ftw.copymovepatches 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ftw.copymovepatches 2.0.0
File Size Uploaded
ftw.copymovepatches-2.0.0.tar.gz 12.0 kB Details

Release files / ftw.copymovepatches-2.0.0.tar.gz

Download URL ftw.copymovepatches-2.0.0.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a5b56a78f34d441af701a2e3b4b1bb527c0c07c8bf984432cbad86b82756e7f9
BLAKE2b-256 checksum
How to use checksums
b1178e6450595aa0aa1e242c13997270afb9afeb14c389269ca7d7137637b8ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.16
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page