Opened 13 years ago
Closed 13 years ago
#1564 closed defect (bug) (fixed)
Importer: fails to import Arabic topics
Reported by: | abdessamad idrissi | Owned by: | |
---|---|---|---|
Milestone: | 2.0 | Priority: | high |
Severity: | major | Version: | 2.0 |
Component: | API - Importers | Keywords: | has-patch |
Cc: |
Description
I went deep to try to find out what is causing this problem then I noticed that; topics with long titles are the ones who suffer from this issue.
for example;
a topic with a name السينما "تقرأ وتشاهد will show, but a topic with a name like: السينما المغربية تعيش طفرة رغم أزمة قاعات العرض won't show! instead a 404 error is outputted.
I posted this on the forums:
http://bbpress.org/forums/topic/bbpress-2-failed-in-some-areas
Attachments (2)
Change History (8)
#2
@
13 years ago
- Keywords has-patch needs-testing added; 404 Arabic bbpress 2 bug importer integration not found removed
#3
@
13 years ago
- Keywords needs-patch added; has-patch needs-testing removed
Alright, you can ignore what I said previously. The issue here is that WP limits post slugs to 200 characters, while bbPress limits them to 255. This is causing slugs to be shortened. Not really a problem unless it's already been converted to octets like Arabic, and probably Hebrew/Cyrillic languages. I've got an idea for a fix, but I'll have to wait until tonight to test it out.
#5
@
13 years ago
- Keywords has-patch added; needs-patch removed
New patch fixes the issue in the most direct way possible. If a slug is greater than 200 characters, the title is then sanitized to create a new slug. This will almost certainly cause issues when users attempt to visit the longer standalone version of the URL. We just have to cross our fingers and hope that the canonical redirect is accurate enough to mitigate the issue.
I dont have an easy way to test, but I think I've found the solution. From traversing the code, it looks like the issue was that an already sanitized title was being sanitized again, which, from what I can tell, was chopping up the new slug and causing it to 404. Again, can't easily test this. I can confirm that the Arabic examples from above, and others I got from his forum link, work just fine when you create them as a new topic. So, at least can narrow it down to the importer-ish area.