Skip to:

Opened 10 years ago

Closed 10 years ago

#1564 closed defect (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


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:

Attachments (2)

1564.001.diff (1.1 KB) - added by cnorris23 10 years ago.
1564.002.diff (1.2 KB) - added by cnorris23 10 years ago.

Download all attachments as: .zip

Change History (8)

#1 @cnorris23
10 years ago

  • Milestone changed from Awaiting Review to 2.0

#2 @cnorris23
10 years ago

  • Keywords has-patch needs-testing added; 404 Arabic bbpress 2 bug importer integration not found removed

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.

10 years ago

#3 @cnorris23
10 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.

#4 @cnorris23
10 years ago

Getting #WP10483 fixed would also help, but we'll have to wait for WP 3.3+.

#5 @cnorris23
10 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.

10 years ago

#6 @johnjamesjacoby
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3363]) Limit length of forum and topic slugs to 200 chars in 1.x importer. Fixes #1564. Props cnorris23.

Note: See TracTickets for help on using tickets.