Unexpected behaviour in Plone's traversal of objects

Here is my scenario, I've got this site setup:


I'm using https://github.com/collective/Products.RedirectionTool to manage "aliases" on my website. Allowing me to create an alias to a piece of content via another URL.

If I wanted to create this alias:
/blog/post3 which references /residential - this would be fine, and the residential page would appear

If I wanted to create this alias:
/blog/commercial which references /residential - this would not work, and it would display the /commercial page instead, rather than the expected alias I have created.

I suspect that the Traversal is working in this order:

  • Check if Page exists by the exact path
  • Check if the ID requested exists in the parent
  • Check if an alias exists

I believe that step 2 and 3 would need to be reversed to ensure the intended behaviour exists.

You can see some of this behaviour in effect here:

This is actually showing the /documents page, purely because it exists in the parent. I would not consider this the intended behaviour

Any idea how I can go about resolving this?

That's implicit acquisition right there.
Check PLIP proposal: Disallow implicit Acquisiton of properties for possible solutions.

The alias function is hooked into the 404. It only does a look up if the url can’t result in loading a page somehow.
So there is no easy way around it without that PLIP remove acquisition (which is not a trivial thing to do as many things rely on it) or reworking how the Alias system works.