Make WordPress Core

Opened 10 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 10 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 10 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
10 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
10 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
10 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
10 years ago

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

#4 @camdensegal
10 years ago

  • Keywords has-patch needs-testing added

#5 @juliobox
10 years ago

  • Keywords has-patch needs-testing removed

Thanks Greg and Camden!

#6 @juliobox
10 years ago

  • Keywords has-patch needs-testing added

@camdensegal
10 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
10 years ago

With that patch script-loader.php now should trim 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.

Last edited 10 years ago by camdensegal (previous) (diff)

#8 @ocean90
10 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.