Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#5056 closed defect (bug) (fixed)

Arabic URLs being saves in lowercase while the browser sends them in upper case leading to 404

Reported by: gametako Owned by: boonebgorges
Priority: normal Milestone: 1.9
Component: I18N Version: 1.7
Severity: normal Keywords: reporter-feedback commit
Cc:

Description

when Arabic slugs are being saved, they get saved in the DB in lowercase which is not according to w3 standards ​http://stackoverflow.com/questions/10828833/utf-8-urls-must-be-uppercase-or-lowercase

this breaks the site as the browser sends buddypress request for the URLs in uppercase which causes 404 pages

for example
​http://www.gametako.com/%D9%85%D8%AC%D9%85%D9%88%D8%B9%D8%A7%D8%AA-%D8%A7%D9%84%D9%85%D8%B7%D9%88%D8%B1%D9%8A%D9%86/%D9%85%D8%B7%D9%88%D8%B1%D9%8A-unity-%D9%8A%D9%88%D9%86%D9%8A%D8%AA%D9%8A/

is not the same as

​http://www.gametako.com/%d9%85%d8%ac%d9%85%d9%88%d8%b9%d8%a7%d8%aa-%d8%a7%d9%84%d9%85%d8%b7%d9%88%d8%b1%d9%8a%d9%86

any quick fixes before a full patch is made?

Attachments (1)

5056.01.patch​ (543 bytes ) - added by r-a-y 13 years ago.

Download all attachments as: .zip

Change History (9)

#1 @gametako
13 years ago

for now, I added

$path = strtolower($path);

to the bp_core_catchuri.php file

#2 @r-a-y
13 years ago

Thanks for the report, gametako. We'll need to be able to duplicate this first.

when Arabic slugs are being saved, they get saved in the DB in lowercase which is not according to w3 standards

What slugs are you referring to? Usernames? Group slugs? Both?

this breaks the site as the browser sends buddypress request for the URLs in uppercase which causes 404 pages

Which browser are you using? Is this specific to only a certain browser?

#3 @DJPaul
13 years ago

  • Keywords reporter-feedback added; needs-patch removed
  • Severity critical → normal

#4 @johnjamesjacoby
13 years ago

  • Milestone Awaiting Review → 1.9

Not a regression, and no feedback for a month. Moving to 1.9, so we can look into what functions are used to save the slugs that are causing problems.

@r-a-y
13 years ago

#5 @r-a-y
13 years ago

01.patch addresses group slug resolution for this UTF8 issue.

This will be fixed when rewrite rules are implemented.

Last edited 13 years ago by r-a-y (previous) (diff)

#6 @boonebgorges
13 years ago

  • Keywords commit added

#7 @boonebgorges
13 years ago

  • Owner set to boonebgorges
  • Resolution → fixed
  • Status new → closed

In 7583:

Convert group slug to lower case when checking whether slug exists

For slugs containing only latin characters, the clause WHERE foo = 'bar'
is non-case-sensitive. However, this is not the case for different UTF8 slugs.
The result is that using the incorrect case in a URL would result in 404s.

Fixes #5056

Props gametako, r-a-y

#8 @DJPaul
10 years ago

  • Component Locale - i18n → I18N
Note: See TracTickets for help on using tickets.