Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 10 years ago

#5353 closed defect (bug)

ACTIVITY and activity slugs

Reported by: henrywright's profile henry.wright Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch needs-unit-tests
Cc:

Description

If I go to example.com/activity I can see the sitewide activity feed. However, if I capitalise 'activity' and go to example.com/ACTIVITY I see an empty page.

I think in the case of example.com/ACTIVITY, you are seeing the WordPress page you created in the WP admin dashboard.

A good example can be seen on buddypress.org. Try going to

http://buddypress.org/community/activity/

and

http://buddypress.org/community/ACTIVITY

Attachments (1)

5353.diff (551 bytes) - added by imath 11 years ago.

Download all attachments as: .zip

Change History (7)

#1 @imath
11 years ago

  • Keywords has-patch 2nd-opinion added

Hi @henry.wright

Interesting catch !

I'm curious to know how you got Uppercases in the url :)

This is also happening on url like site.url/members/username/Messages/ .. I'm not sure my patch is the best way to handle this issue. But it seems to fix it!

@imath
11 years ago

#2 @henry.wright
11 years ago

@imath - I was working to get something done quickly and was trying to type fast. I must have hit the 'Caps Lock' key just before I typed the 'a' in activity :)

#3 @boonebgorges
11 years ago

I think in the case of example.com/ACTIVITY, you are seeing the WordPress page you created in the WP admin dashboard.

Yeah, this sounds right. Looks like our URI router isn't recognizing the two as equivalent.

I would like to have this tested with non-Latin alphabets before continuing. Casting both the page slug and bp_uri to lowercase via mb_strtolower() should be enough, but this should be verified for Arabic or Chinese or Russian or something like that.

#4 @DJPaul
11 years ago

  • Milestone changed from Awaiting Review to 2.1

Moving to 2.1 for further view and to fix.

#5 @DJPaul
10 years ago

  • Keywords needs-unit-tests added; 2nd-opinion removed
  • Milestone changed from 2.1 to 2.2

Moving to 2.2 as we need a bunch of unit tests to be careful we don't break the URI router. If someone wants to write tests in the next week or so, we can move it back to 2.1.

#6 @DJPaul
10 years ago

  • Milestone 2.2 deleted
  • Status changed from new to closed

Going to close in favour of another ticket #5865 with a similar issue that also covers non-Latin characters, and has a start at unit tests.

Note: See TracTickets for help on using tickets.