Skip to:
Content

BuddyPress.org

Opened 7 years ago

Closed 7 years ago

Last modified 4 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
Milestone: 1.9 Priority: normal
Severity: normal Version: 1.7
Component: I18N 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 7 years ago.

Download all attachments as: .zip

Change History (9)

#1 @gametako
7 years ago

for now, I added

$path = strtolower($path);

to the bp_core_catchuri.php file

#2 @r-a-y
7 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
7 years ago

  • Keywords reporter-feedback added; needs-patch removed
  • Severity changed from critical to normal

#4 @johnjamesjacoby
7 years ago

  • Milestone changed from Awaiting Review to 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
7 years ago

#5 @r-a-y
7 years ago

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

The larger problem appears to be more WP-centric due to sanitize_title(), which we rely on for sanitizing slugs.

Version 0, edited 7 years ago by r-a-y (next)

#6 @boonebgorges
7 years ago

  • Keywords commit added

#7 @boonebgorges
7 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to 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
4 years ago

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