To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Ticket #237 (accepted defect)

Opened 22 months ago

Last modified 15 months ago

Custom slugs shouldn't be changed

Reported by: agilbert Owned by: tboutell
Priority: major Milestone: 1.6
Component: apostrophePlugin Version: trunk
Keywords: Cc: rickybanister, geoffd
Symfony version: 1.4

Description

1. I have a page under About called Staff.
2. I give that page a custom slug called /our-awesome-staff.
3. I decide to move that page underneath the contact section.
4. Now the slug is /contact/our-awesome-staff. This isn't what I wanted!

The redirect still works for this kind of situation, but we should avoid rewriting these custom slugs.

Change History

Changed 22 months ago by boutell

  • status changed from new to accepted

How does a custom slug stop being custom, if ever? Is there any way to take that decision back? Is it a boolean that stays stuck on 'true'?

My current rules of thumb aren't 100% perfect but most of the time they do what is wanted.

I could adjust it to be more conservative. Something like "if the current slug consists of the old parent's slug plus the slugification of the current page title, we can update it automatically, otherwise we mustn't."

Thoughts?

Changed 22 months ago by agilbert

Right, the conservative approach makes sense to me. If the slug of the page matches the straight slugification of its position in the page tree, then it is eligible for renaming.

Otherwise, leave it alone.

This should accommodate most, if not all, scenarios.

Changed 22 months ago by agilbert

  • version set to trunk

Changed 21 months ago by boutell

  • milestone changed from 1.4 to 1.5

Changed 17 months ago by tboutell

  • owner changed from boutell to tboutell

Changed 15 months ago by geoffd

  • milestone changed from 1.5 to 1.6

Check each section of the permalink and preserve anything that was changed.

Note: See TracTickets for help on using tickets.