#10966 closed defect (bug) (fixed)
bug: Post Slug in Quick-Edit mode for non-english languages
Reported by: | ramiy | Owned by: | dwright |
---|---|---|---|
Milestone: | 2.9 | Priority: | high |
Severity: | normal | Version: | 2.9 |
Component: | Quick/Bulk Edit | Keywords: | has-patch needs-testing 2nd-opinion |
Focuses: | Cc: |
Description
I use WP in hebrew.
When i edit posts using "Posts Edit SubPanel", i see the Slug in hebrew letters (pic1.png).
When i edit posts using "Quick Edit" the Slug shows gibberish letters (pic2.png).
Please fix this annoying bug.
Attachments (10)
Change History (26)
@
15 years ago
demonstrates resolution of issue using slug of string 'internationalizætiøn' (edit mode)
@
15 years ago
demonstrates resolution of issue using slug of string 'internationalizætiøn' (Quick Edit)
#2
@
15 years ago
- Cc david_v_wright@… added
- Keywords has-patch needs-testing 2nd-opinion added
What I understand this issue to be:
This issue demonstrates that the slug displays to the user in it's (url) encoded form.
The slug is used in urls.
http://www.faqs.org/rfcs/rfc1738.html
URLs are written only with the graphic printable characters of the
US-ASCII coded character set. The octets 80-FF hexadecimal are not
used in US-ASCII, and the octets 00-1F and 7F hexadecimal represent
control characters; these must be encoded.
So, while the slug appears to the end user as 'gibberish letters' it is actually the
(properly) encoded version of the string.
To resolve this issue, display the slug to the user decoded.
(i.e. so it looks like it did when they created it)
I don't know Hebrew, so to recreate this issue, I set the slug to name that contains non US-ASCII characters.
Categories -> Category Name (testing) -> Category Slug (internationalizætiøn)
see attached before and after screen shots.
see attached patch files
these changes 'work', I'm just not sure it's the most appropriate/elegant solution, someone more familiar with the code base should review. (I believe I have added the necessary keywords)
#3
@
15 years ago
It needs more work.
the slug problem exists in:
- Post Edit - wp-admin/edit.php
- Tag Edit - wp-admin/edit-tags.php
- Page Edit - wp-admin/edit-pages.php
- Category Edit - wp-admin/categories.php
- Link Category Edit - wp-admin/edit-link-categories.php
#4
@
15 years ago
- Owner set to dwright
- Status changed from new to accepted
Post Edit - wp-admin/edit.php
- can't recreate. not sure how, what is 'Post Edit'? 'Quick Edit' displays slug correctly for me
Can you provide a screen shot or steps for how to recreate the issue?
Tag Edit - wp-admin/edit-tags.php
- confirmed, displays incorrectly, I can fix this.
Page Edit - wp-admin/edit-pages.php
- where? 'Quick Edit' displays slug correctly for me Can you provide a screen shot or steps for how to recreate the issue?
works for me:
Category Edit - wp-admin/categories.php
- displays slug correctly for me Can you provide a screen shot or steps for how to recreate the issue?
Link Category Edit - wp-admin/edit-link-categories.php
- displays incorrectly, will fix this.
#5
@
15 years ago
see template.php.diff "newest patch for wp-admin/includes/template.php"
should resolve:
Tag Edit - wp-admin/edit-tags.php
#6
@
15 years ago
see template.php.diff "newest patch for wp-admin/includes/template.php"
should resolve: Link Category Edit - wp-admin/edit-link-categories.php
Again, more information needed to address:
Post Edit - wp-admin/edit.php
Page Edit - wp-admin/edit-pages.php
Category Edit - wp-admin/categories.php
#7
@
15 years ago
Lets summarize your edit in wp-admin/includes/template.php file:
- Tag Edit - _tag_rows() function fixed
- Category Edit - _cat_row() function fixed
- Link Category Edit - link_cat_row() function fixed
- Post Edit - line_edit_row() function fixed (Quick Edit Mode)
- Page Edit - line_edit_row() function fixed (Quick Edit Mode)
i think you fixed all the problems. needs-testing.
#9
in reply to:
↑ 8
@
15 years ago
- Milestone changed from Future Release to 2.9
Replying to ryan:
Why "future release"?
dwright fixed this bug!
#11
@
15 years ago
Right now all enhancements are being moved out of 2.9 in preparation for release. I'll see if the i18n maintainer wants to make this an exception though.
#13
@
15 years ago
Both #6915 and #10966 fix the same bug for non english languages in post slug using 'editable_slug' filter.
#6915 fixed:
- wp-admin/includes/post.php
- wp-admin/edit-link-category-form.php
- wp-admin/edit-tag-form.php
- wp-admin/edit-category-form.php
#10966 fixes:
- wp-includes/category.php
- wp-admin/includes/template.php
Ticket #6915 did not fix all the slug problems. In ticket #10966 dwright fexed few more slug bugs.
#14
@
15 years ago
The template.php.diff
last patch looks good.
Any time a slug is saved it goes through urlencode (which isn't actually needed, but that's another discussion), so this patch won't break any existing slugs.
wp-includes/category.php.patch file