Closed
Description
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:
- Create a new page at the root and set as the home page. Use default settings.
- Publish home page
- Create a sub-page off the root with a simple title and slug (ex. Archer, archer)
- Publish sub-page and note its public url. In this case "localhost/archer"
- Make a change to the home page such updating title or adding a plugin
- 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.