Skip to main content

Redirect when traversing to acquired content outside the current path.

Project description

collective.redirectacquired

This Plone addon aims to solve the very common issue of having a lot of different URLs that publish the same content item via acquisition.

Zope implicit acquisition leads to many use case where URLs that are valid for the publisher are produced but are not the URLs meant by the users of the system.

This addon modifies the publication process to ensure that instead of allowing traversal from a content item to another content item via acquisition, we redirect to the URL of the traversed content item.

In the previous paragraph, an item is considered a content item if and only if it provides Products.CMFCore.IContentish.

This should avoid false positive redirects for URL path item that are acquired but are actually parts of the software rather than content items.

If you need to enable publication of content items via acquisition, mark them with collective.redirectacquired.interfaces.IPublishableThroughAcquisition.

Changelog

1.0a8 (2018-01-25)

  • Redirect permanently (301) [gotcha]

1.0a7 (2018-01-24)

  • Take care of QUERY_STRING. [gotcha]

  • Do not redirect if REQUEST_METHOD is not GET. [gotcha]

1.0a6 (2018-01-24)

  • Fix and test when logging only. [gotcha]

1.0a5 (2018-01-24)

  • Fix rushed code. [gotcha]

1.0a4 (2018-01-24)

  • Logging is back. [gotcha]

1.0a3 (2018-01-24)

  • More tests and refactoring [gotcha]

1.0a2 (2018-01-22)

  • More tests [gotcha]

  • Much simpler implementation [gotcha]

1.0a1 (2018-01-17)

  • Remove useless inclusion of CMFPlone in configure.zcml [gotcha]

1.0a0 (2018-01-17)

  • Initial release [gotcha]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.redirectacquired-1.0a8.tar.gz (186.9 kB view details)

Uploaded Source

File details

Details for the file collective.redirectacquired-1.0a8.tar.gz.

File metadata

File hashes

Hashes for collective.redirectacquired-1.0a8.tar.gz
Algorithm Hash digest
SHA256 755ce94b33cd95cae25b42d496dd4b909eeadd7ef9e31b7e7540504988f857d1
MD5 e1fb79f1527b0d937786591aacbf4fe8
BLAKE2b-256 e3878db779996645eb757bc269d19e636d9250fbe83a3984ece450139565cbe9

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page