8000 Publishing updates to home/root page prefixes child public page paths with "%2F" · Issue #6307 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content
Publishing updates to home/root page prefixes child public page paths with "%2F"  #6307
Closed
@mtully-blitz

Description

@mtully-blitz

Summary

The extra slash is only added when both the parent and child page have already been published. The
draft version of the child page still has the correct path
Steps to recreate:

  1. Create a new page at the root and set as the home page. Use default settings.
  2. Publish home page
  3. Create a sub-page off the root with a simple title and slug (ex. Archer, archer)
  4. Publish sub-page and note its public url. In this case "localhost/archer"
  5. Make a change to the home page such updating title or adding a plugin
  6. Publish the homepage

Expected behavior

The public path of child pages should not change

Actual behavior

As a logged out public user go to localhost/archer and you will get a 404. If you have a menu on your home page it will show the url for the subpage as "/%2Farcher"

Environment

  • Python version: 3.6.6
  • Django version: 1.11.10
  • django CMS version: 3.5.1 and 3.5.0

What to Fix

The culprit appears to be this line of code: https://github.com/divio/django-cms/blob/3.5.1/cms/models/pagemodel.py#L1121

I believe fixing is as easy as comparing if base == '/' and excluding the '/'. Will try to confirm.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0