{ "info": { "author": "Maurits van Rees", "author_email": "m.van.rees@zestsoftware.nl", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Framework :: Plone :: 4.3", "Framework :: Plone :: 5.0", "Framework :: Plone :: 5.1", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python", "Programming Language :: Python :: 2.7" ], "description": ".. contents::\n\n\nDocumentation\n=============\n\n.. image:: http://img.shields.io/pypi/v/collective.catalogcleanup.svg\n :target: https://pypi.python.org/pypi/collective.catalogcleanup\n\n.. image:: https://img.shields.io/travis/collective/collective.catalogcleanup/master.svg\n :target: http://travis-ci.org/collective/collective.catalogcleanup\n\n.. image:: https://img.shields.io/coveralls/collective/collective.catalogcleanup/master.svg\n :target: https://coveralls.io/r/collective/collective.catalogcleanup\n\nUsage and goal\n--------------\n\nAdd collective.catalogcleanup to the eggs in your buildout (and to zcml on\nPlone 3.2 or earlier). This makes a browser view available on the\nPlone Site root: ``@@collective-catalogcleanup``.\n\nThis goes through the portal_catalog and removes all catalog brains\nfor which a ``getObject`` call does not work. In other words, it\nremoves brains that no longer belong to an actual object in the site.\n\nSimilar cleanups are done for the uid_catalog and the\nreference_catalog.\n\nThe goal is to get rid of outdated brains that could otherwise cause\nproblems, for example during an upgrade to Plone 4.\n\n``@@collective-catalogcleanup`` by default does a dry run, so it\nonly reports problems. Call it with\n``@@collective-catalogcleanup?dry_run=false`` to perform the actual cleanup.\n\n\nDetails\n-------\n\nSo what does the catalog cleanup do?\n\n- It removes stuff! You *must* make a backup first!\n\n- It handles these catalogs: ``portal_catalog``, ``uid_catalog``,\n ``reference_catalog``.\n\n- For each catalog it reports the number of catalog brains it\n contains.\n\n- It removes brains that have a UID of ``None``.\n\n- It removes brains of which the object is broken. This can happen\n when the object belongs to a package that is no longer available in\n the Plone Site.\n\n- It removes brains of which the object cannot be found.\n\n- It looks for non unique uids. There can be some legitimate reasons\n why some brains may have the same UID, for example when they belong\n to comments: the UID is inherited from the parent object. Those\n items are kept. For other items we accept one object and we give\n the other objects a new UID.\n\n- References between objects that no longer exist or are broken, will\n be removed.\n\n- A simple report will be printed in the browser. For one catalog it\n may look like this::\n\n Handling catalog portal_catalog.\n Brains in portal_catalog: 20148\n portal_catalog: removed 25 brains without UID.\n portal_catalog: removed 100 brains with status broken.\n portal_catalog: removed 5 brains with status notfound.\n portal_catalog: 249 non unique uids found.\n portal_catalog: 249 items given new unique uids.\n\n- The instance log may contain more info, about individual items.\n\n\nAlternatives\n------------\n\n- A clear and rebuild of the portal_catalog should have partially the\n same effect, but it will likely take a lot longer and it will not\n solve some of the problems mentioned above. But this is definitely\n the most logical thing to try before giving\n ``collective.catalogcleanup`` a go.\n\n\nCompatibility\n-------------\n\nI have tried this on Plone 3.3, Plone 4 and Plone 5.\n\nIt is automatically tested by Travis on Plone 4.3, 5.0, and 5.1, all on Python 2.7.\n\n\nAuthors\n-------\n\nMaurits van Rees\n\nChangelog\n=========\n\n\n1.9.0 (2018-09-25)\n------------------\n\n- Catch TypeError when getting object for brain.\n Can happen when an object that used to be referenceable is no longer referenceable.\n Fixes `issue #19 `_.\n [maurits]\n\n- Disable CSRF protection.\n Fixes `issue #17 `_.\n [maurits]\n\n- Abort any transaction changes in dry run mode.\n There should not be any changes here anyway, but this makes sure.\n [maurits]\n\n\n1.8.0 (2018-04-30)\n------------------\n\n- No longer test on Plone 4.1 and 4.2 and on Python 2.6. [maurits]\n\n- Catch ``KeyError`` and ``AttributeError`` for ``getPath`` in more cases.\n Fixes `issue #14 `_.\n [maurits]\n\n\n1.7.2 (2017-09-18)\n------------------\n\n- Added traceback info to help in case of problems. [maurits]\n\n\n1.7.1 (2017-03-07)\n------------------\n\n- Tested for compatibility on Plone 4.0 through 5.1. [hvelarde]\n\n- Ignore non existing catalogs. Plone 5 does not always have\n a ``uid_catalog`` or ``reference_catalog``.\n Fixes `issue #5 `_.\n [maurits]\n\n\n1.7 (2017-03-03)\n----------------\n\n- Don't look for non unique ids in the ``reference_catalog``.\n It looks like it is normal there. At least, on one Plone 4.3 site\n the code keeps creating several new uids every time I run it.\n [maurits]\n\n- Don't complain about brains in ``reference_catalog`` where ``getObject`` returns None.\n This happens for content without apparent problems. [maurits]\n\n\n1.6 (2016-08-23)\n----------------\n\n- Do not complain about brains in uid_catalog that are references.\n When their path points to ``...at_references/`` then\n this is normal. I started wondering about a site that had more than\n 20 thousand problems reported this way. [maurits]\n\n\n1.5 (2015-07-31)\n----------------\n\n- Remove all items that have the ``portal_factory`` folder in their\n path.\n [maurits]\n\n\n1.4 (2014-05-12)\n----------------\n\n- Catch KeyErrors when getting the path of a brain.\n [maurits]\n\n\n1.3 (2013-09-02)\n----------------\n\n- Give less confusing message for comments that inherit the UID of\n their parent. It sounded too much like an error.\n [maurits]\n\n\n1.2 (2012-06-04)\n----------------\n\n- Improved the cleanup of non unique uids.\n [maurits]\n\n\n1.1 (2012-05-14)\n----------------\n\n- When doing an reindexObject, only reindex the UID.\n [maurits]\n\n\n1.0 (2012-04-27)\n----------------\n\n- Initial release\n [maurits]", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/collective/collective.catalogcleanup", "keywords": "plone catalog cleanup", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "collective.catalogcleanup", "package_url": "https://pypi.org/project/collective.catalogcleanup/", "platform": "", "project_url": "https://pypi.org/project/collective.catalogcleanup/", "project_urls": { "Homepage": "https://github.com/collective/collective.catalogcleanup" }, "release_url": "https://pypi.org/project/collective.catalogcleanup/1.9.0/", "requires_dist": null, "requires_python": "", "summary": "Remove outdated items from the catalog", "version": "1.9.0" }, "last_serial": 4310090, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "c814319ee8852dc637359323214cf70f", "sha256": "624e236fb62631c052172ae61b784d6891a773e28d3b7bc53f18cb1faf00d88b" }, "downloads": -1, "filename": "collective.catalogcleanup-1.0.zip", "has_sig": false, "md5_digest": "c814319ee8852dc637359323214cf70f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17634, "upload_time": "2012-04-27T18:29:59", "url": "https://files.pythonhosted.org/packages/f9/03/1f50a34c1eebe1b48ba54aa9b290b8c6270ad6349c3ea41dafb49dff384d/collective.catalogcleanup-1.0.zip" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "3fffedc804127696e1570d8c93821c71", "sha256": "168c3470e2ec1b54a6a54b672f575b1c958e2011545918f51e962f39c27e7aa2" }, "downloads": -1, "filename": "collective.catalogcleanup-1.1.zip", "has_sig": false, "md5_digest": "3fffedc804127696e1570d8c93821c71", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17765, "upload_time": "2012-05-14T10:45:54", "url": "https://files.pythonhosted.org/packages/00/a6/7cf6dae94132bda3f1375d6e29f9cab276487a474e22b8680d9e45dfa997/collective.catalogcleanup-1.1.zip" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "68bb7ae62cd3c866269471615fcd037e", "sha256": "e2a6b6831ae0aef9c131ef9b7b9fa85f47e32365e8aa3b736214c25ea91a5e5b" }, "downloads": -1, "filename": "collective.catalogcleanup-1.2.zip", "has_sig": false, "md5_digest": "68bb7ae62cd3c866269471615fcd037e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17987, "upload_time": "2012-06-04T12:19:57", "url": "https://files.pythonhosted.org/packages/e8/f9/0f2a79e5ffdd9115bfb38e22ba1b2747f92d9fff0ae1da90cb5c2ba84d3e/collective.catalogcleanup-1.2.zip" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "7b5a131509f134466f2520285af34670", "sha256": "d8b3e13a0ffc6a380f77294dd89149eebbad0b3a32f230131d4bb5605963bab7" }, "downloads": -1, "filename": "collective.catalogcleanup-1.3.zip", "has_sig": false, "md5_digest": "7b5a131509f134466f2520285af34670", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21731, "upload_time": "2013-09-02T15:03:49", "url": "https://files.pythonhosted.org/packages/f7/d4/dda8f814b8d0b0d35e479df1613ced82baf91d4eb20b3b17e237c5667760/collective.catalogcleanup-1.3.zip" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "9c42a7578c9477cdf22cbb5f7719209a", "sha256": "f99a2d6fb8a3179b1c441f7b60b44c2f0bc24b758bb03464d3075d5b00371c8f" }, "downloads": -1, "filename": "collective.catalogcleanup-1.4.zip", "has_sig": false, "md5_digest": "9c42a7578c9477cdf22cbb5f7719209a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21903, "upload_time": "2014-05-12T10:44:28", "url": "https://files.pythonhosted.org/packages/0a/83/64a79627611be757880ba1fcbe4fe7f06aec8e90514d371dfa5af31d886c/collective.catalogcleanup-1.4.zip" } ], "1.5": [ { "comment_text": "", "digests": { "md5": "9c3527559f22db393c30f553a7bb85ed", "sha256": "5d3197d4f1d7f5df32f1f1f6dff3cac7188b2fac71ecb09c8609664b610b13b1" }, "downloads": -1, "filename": "collective.catalogcleanup-1.5.tar.gz", "has_sig": false, "md5_digest": "9c3527559f22db393c30f553a7bb85ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8305, "upload_time": "2015-07-31T15:31:29", "url": "https://files.pythonhosted.org/packages/8e/48/2d963967d363b24d0c4b77a4883ca134dfa79b76816692be91b739c5b52e/collective.catalogcleanup-1.5.tar.gz" } ], "1.6": [ { "comment_text": "", "digests": { "md5": "52b267f77b4100125f2c06be0d07301c", "sha256": "5cdc608444e8bee6938a92f44d988d4cbee0f42cc7adab42307d91602c2a6a8b" }, "downloads": -1, "filename": "collective.catalogcleanup-1.6.tar.gz", "has_sig": false, "md5_digest": "52b267f77b4100125f2c06be0d07301c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8637, "upload_time": "2016-08-23T17:33:52", "url": "https://files.pythonhosted.org/packages/4e/c2/d9b4df3190170bc16b1c2d365c8b487c4290d2b993d6042dfc699f834bc0/collective.catalogcleanup-1.6.tar.gz" } ], "1.7": [ { "comment_text": "", "digests": { "md5": "dca370f960dcca0c74739e4070f611b5", "sha256": "9c3985a14fa871986d72ce0529fad89d1382273d7011c3432628d5f2b80e4ce1" }, "downloads": -1, "filename": "collective.catalogcleanup-1.7.tar.gz", "has_sig": false, "md5_digest": "dca370f960dcca0c74739e4070f611b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9382, "upload_time": "2017-03-03T14:42:38", "url": "https://files.pythonhosted.org/packages/53/83/39c79f0a4073baba77031efb4f90ee06a9934016e7245f4d7540c4bc5f61/collective.catalogcleanup-1.7.tar.gz" } ], "1.7.1": [ { "comment_text": "", "digests": { "md5": "5fcbe57c3065758dd6882c15595af9b2", "sha256": "2c03e56b13cbaea49f16a03552bdd7a8f0f0433bbc1388fed19e8cc5df80c3cf" }, "downloads": -1, "filename": "collective.catalogcleanup-1.7.1.tar.gz", "has_sig": false, "md5_digest": "5fcbe57c3065758dd6882c15595af9b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9570, "upload_time": "2017-03-07T16:15:21", "url": "https://files.pythonhosted.org/packages/96/79/b016f23eb5e9a71223048201fa80b6029a1b2905925365217eb6ca42993b/collective.catalogcleanup-1.7.1.tar.gz" } ], "1.7.2": [ { "comment_text": "", "digests": { "md5": "803095fbc01d9c897807b5dd8399bfd8", "sha256": "d388564d9212bd0df3b1264a917b769367417a43f3c21ecedcbae6b69e5df25d" }, "downloads": -1, "filename": "collective.catalogcleanup-1.7.2.tar.gz", "has_sig": false, "md5_digest": "803095fbc01d9c897807b5dd8399bfd8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9635, "upload_time": "2017-09-18T06:46:24", "url": "https://files.pythonhosted.org/packages/f0/5f/15405d6601b3fe8869352ef70d4c61cf076ba4553970fd4a6450c4608fba/collective.catalogcleanup-1.7.2.tar.gz" } ], "1.8.0": [ { "comment_text": "", "digests": { "md5": "089fe1d5e551cf761eb73ef8541c8ee8", "sha256": "cf6bc370dce998e02e219aa8fcbbb290efa2f4fd6a66f71cfb5cb44fef57a3b9" }, "downloads": -1, "filename": "collective.catalogcleanup-1.8.0.tar.gz", "has_sig": false, "md5_digest": "089fe1d5e551cf761eb73ef8541c8ee8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11341, "upload_time": "2018-04-30T10:44:22", "url": "https://files.pythonhosted.org/packages/d5/30/99065e85834dabe6b91236ba625e95c0f7e1dd3a575307808c63f4af9581/collective.catalogcleanup-1.8.0.tar.gz" } ], "1.9.0": [ { "comment_text": "", "digests": { "md5": "d0d5af106bdaa5dabd4cdc0d94b4ddad", "sha256": "c72eaaa2b48c5f925842827d148b0a964d2c2506866ee67e8f5d04ab1b45bbdb" }, "downloads": -1, "filename": "collective.catalogcleanup-1.9.0.tar.gz", "has_sig": false, "md5_digest": "d0d5af106bdaa5dabd4cdc0d94b4ddad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11903, "upload_time": "2018-09-25T20:45:17", "url": "https://files.pythonhosted.org/packages/2e/55/2f630f50948d9291dc18447665bba78ea914967ab14363c661a4d525110f/collective.catalogcleanup-1.9.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d0d5af106bdaa5dabd4cdc0d94b4ddad", "sha256": "c72eaaa2b48c5f925842827d148b0a964d2c2506866ee67e8f5d04ab1b45bbdb" }, "downloads": -1, "filename": "collective.catalogcleanup-1.9.0.tar.gz", "has_sig": false, "md5_digest": "d0d5af106bdaa5dabd4cdc0d94b4ddad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11903, "upload_time": "2018-09-25T20:45:17", "url": "https://files.pythonhosted.org/packages/2e/55/2f630f50948d9291dc18447665bba78ea914967ab14363c661a4d525110f/collective.catalogcleanup-1.9.0.tar.gz" } ] }