Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Slug of page with untranslated parents is wrong #1209

beniwohli opened this Issue Mar 30, 2012 · 3 comments


None yet
4 participants

beniwohli commented Mar 30, 2012

Consider a page tree like this:

 |-- foo (de|en)
 |-- bar (de)
 |    |-- foo (de|en)

The slug of the sub page in german will be /foo/bar/, but in english it ends up being /foo/, clashing with the first page and resulting in a MultipleObjectsReturned exception when trying to access either one.

I'm not sure what the correct behavior in this case should be. Some ideas:

  • throw a ValidationError if any parent is not translated. Is this even possible/desirable?
  • if a parent is not translated, take its pk as path segment (and rewrite them once a translation becomes available). Problem: URLs change after the fact, not ideal for SEO and other considerations.
  • use the path segment of a translated version of the parent. At least one language has to be available by definition. Same problem as with the pk solution

evildmp commented Jun 15, 2012

I think the most elegant way out of this is your third suggestion, use the path segment of a translated version of the parent.

In some cases, the path segment won't change. Yes, it's not ideal for SEO - but it's not a huge deal. If the page/language combination were that important in the first place, then the parent would probably have been available in the first place.


digi604 commented Feb 10, 2014

i agree with @evildmp


yakky commented May 28, 2014

This is no longer the case in django CMS 3
Children pages of an unpublished page are treated as unpublished, thus solving this case

@yakky yakky closed this May 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment