New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sibling pages w/ same beginning slug #993

Closed
AdamChlan opened this Issue Sep 27, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@AdamChlan

AdamChlan commented Sep 27, 2016

Expected behaviour

I would expect all sibling pages to be siblings, rather than one being incorrectly considered a parent.

Actual behaviour

It two sibling pages share the same slug beginning, the one with the shorter slug is considered a parent. For instance:

site.com/test <- This is considered a parent of the page below, even when they are siblings
site.com/test-again

Steps to reproduce

  1. Create two sibling pages in the style shown above.
  2. Build a navigation displaying pages, and add a conditional to add a class to parent pages.
  3. When on site.com/test-again, the nav link for site.com/test will receive the parent class.

Server configuration

Operating system:
OS X
Web server:
Ubuntu 14.4
PHP version:
5.6.x I believe
Statamic version:
2.1.12
Updated from an older Statamic or fresh install:
updated
List of installed addons:
Bluebird

Logs

If any logs (browser, server, or Statamic) are appropriate...

Add those logs here

@jackmcdade jackmcdade self-assigned this Sep 27, 2016

@jackmcdade jackmcdade added the bug label Sep 27, 2016

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Sep 27, 2016

Nice find! Fixed for next release.

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