Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#28471 closed defect (bug) (fixed)

"quick edit" on a term replace the last one

Reported by: juliobox's profile juliobox Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Quick/Bulk Edit Keywords: has-patch needs-testing commit
Focuses: ui, javascript Cc:

Description

Hello

Look at this :

https://dl.dropboxusercontent.com/u/45956904/ScreenShots/wtf_tag.gif

When i try to add a (custom) tag, the last one is replaced ! Tested on a 4.0-a, twentystuff, no plugins.

That's all. :)

Attachments (2)

28471.diff (2.5 KB) - added by camdensegal 11 years ago.
Patch for suggest and inline-edit-post to allow for tag suggestion with only delimiter and no whitespace.
28471-2.diff (2.9 KB) - added by camdensegal 11 years ago.
Updated to trim tag delimiter to solve any localization that may add whitespace around the delimiter, removed whitespace option, and cleaned js code style.

Download all attachments as: .zip

Change History (13)

#1 @GregLone
11 years ago

Reproduced with WP 3.9.1, and the trick is quite dumb.
If you put a comma and TWO spaces after your keyword, it will work properly. No spaces or only one space after the comma, and the last keyword will be replaced.

Nice catch.

#2 @camdensegal
11 years ago

I took a look here and realized that this issue is specific to the french translation. In the FR_fr translation the tag delimiter which is usually "," is instead ", " (with a space). inline-edit-post.js adds a space automatically to the delimiter so the french translation requires two spaces as delimiters. Here is a link to the translation in question.

http://translate.wordpress.org/projects/wp/dev/fr/default?filters[status]=either&filters[original_id]=40338&filters[translation_id]=1607151

It may also make sense to trim the delimiter in inline-edit-post.js to protect against issues like this in all translations.

#3 @camdensegal
11 years ago

There is also a larger issue that the tag suggestion should allow the user to put a comma and no space to separate tags, while right now the space is required or the previous tag is replaced as above.

The suggest plugin needs to differentiate between the delimiter and the white space around it so that the white space is not required.

@camdensegal
11 years ago

Patch for suggest and inline-edit-post to allow for tag suggestion with only delimiter and no whitespace.

#4 @camdensegal
11 years ago

  • Keywords has-patch needs-testing added

#5 @juliobox
11 years ago

  • Keywords has-patch needs-testing removed

Thanks Greg and Camden!

#6 @juliobox
11 years ago

  • Keywords has-patch needs-testing added

@camdensegal
11 years ago

Updated to trim tag delimiter to solve any localization that may add whitespace around the delimiter, removed whitespace option, and cleaned js code style.

#7 @camdensegal
11 years ago

With that patch script-loader.php now should trip the delimiter so the change to the translation shouldn't be required and any other whitespace issues with the tag delimiter should also be resolved.

Version 0, edited 11 years ago by camdensegal (next)

#8 @ocean90
11 years ago

  • Milestone changed from Awaiting Review to 4.0

#9 @SergeyBiryukov
10 years ago

  • Keywords commit added

This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.


10 years ago

#11 @SergeyBiryukov
10 years ago

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

In 28851:

Fix unexpected replacement of a previous tag when selecting a tag from autosuggest results.

props camdensegal.
fixes #28471.

Note: See TracTickets for help on using tickets.