Not Logged In

plone.app.redirector 1.3.5

Introduction

by Martin Aspeli <optilude@gmx.net> based on work by Helge Tesdal
(RedirectionTool) and Whit Morriss (topp.rose).

Bring dead links back to life! plone.app.redirector knows where your content
used to be and can bring you to its new location when content moves.

This component expects you to register storage.RedirectionStorage as a local
utility providing IRedirectionStorage (CMFPlone does this). Once that’s done,
the subscribers in subscribers.py will listen for object moved and object
deleted events.

When an object is moved (renamed or cut/pasted into a different location),
the redirection storage will remember the old path. It is smart enough to
deal with transitive references (if we have a -> b and then add b -> c,
it is replaced by a reference a -> c) and circular references (attempting to
add a -> a does nothing).

When an object is deleted, all references to it are deleted as well.

The view in browser.py contains methods (used in Plone’s
default_error_message.pt when it gets a NotFound error) that do the following:

attempt to redirect from the assumed intended path to the new path of an
object, if the redirection storage holds a reference from the old path.

if not, look for the first valid parent of the assumed intended path, and
present it as an option to the user

further, use the last id of the assumed intended path and attempt to search
for objects in the catalog that contain this, presenting the options to the
user

Changelog

1.3.5 (2017-06-20)

Bug fixes:

remove unittest2 dependency
[kakshay21]

1.3.4 (2017-01-12)

Bug fixes:

Don’t test repr of tree iterator.
[davisagli]

1.3.3 (2016-11-10)

Bug fixes:

Add coding header on python files.
[gforcada]

1.3.2 (2016-08-18)

Fixes:

Use zope.interface decorator.
[gforcada]

1.3.1 (2015-09-09)

Fixed tests to use registry for value lookup.
[esteele]

1.3 (2015-08-14)

Rerelease of 1.2.1 as 1.3 for clarity. This is for Plone 5 only.
[maurits]

1.2.2 (2015-08-14)

Rerelease of same code as 1.2. The changes from 1.2.1 are for Plone 5.
[maurits]

1.2.1 (2014-02-26)

Rename without using folder_contents.
[davisagli]

Use p.a.contenttypes test fixture and adapt/fix failing tests due to the
ATContentTypes removal from PLONE_FIXTURE in Plone 5.
[timo]

1.2 (2013-05-26)

Support redirecting to external URLs.
[rpatterson]

1.2a1 (2012-07-02)

Import object events from zope.lifecycleevent.
[davisagli]

Move tests from PloneTestCase to plone.app.testing.
[timo]

1.1.3 (2012-05-07)

Support parts of views e.g. mypage/@@myview/somepart
[anthonygerrard]

#12354 will redirect based on the query string as well as path if query_string
stored. [djay]

#9967 will append the same query string after redirecting to be more tracker
friendly. [djay]

#12858 first suggestion on not found page can be unsuitable
[anthonygerrard]

1.1.2 - 2011-07-05

Don’t break in the objectMoved handler if the request has no ACTUAL_URL, to
facilitate testing.
[davisagli]