Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 12 years ago

#13413 closed defect (bug) (worksforme)

Querying Taxonomies (Tag) containing the sequence "-נ-" fails.

Reported by: hakre's profile hakre Owned by: scribu's profile scribu
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Query Keywords: has-patch needs-refresh
Focuses: Cc:

Description

Fresh from Beta testing latest trunk:

1.) Created a Tag "test -נ- end"

2.) Added the Tag to a Post

3.) Pressed that Tag in my Tag Cloud

4.) Get the not Found Message.

Attachments (3)

13413.patch (8.4 KB) - added by hakre 14 years ago.
13413.2.patch (1.3 KB) - added by hakre 14 years ago.
Minified Patch
13413.diff (1.6 KB) - added by wojtek.szkutnik 14 years ago.

Download all attachments as: .zip

Change History (27)

#1 @nacin
15 years ago

Is this not an obvious duplicate of #11669?

#2 @hakre
15 years ago

This went through, related tickets were:

#11669, #11724

#11669 is not a duplicate because that is 2.9 and cutting names. The tag now works while creating it. This time it is about querying all pages with that tag I guess. I dunno where that 404 actually comes from. That needs to be investigated further.

#11724 might be the exact same thing, but I'm not sure.

#3 @dd32
15 years ago

Is this a regression from 2.9?

#4 @ryan
15 years ago

I cut-and-paste that text and couldn't reproduce in 2.9 or 3.0, for what it's worth.

#5 follow-up: @ocean90
15 years ago

I could reproduce it in 3.0 and 2.9 on my local install (windows, xampp) but not on my server install.

#6 @ryan
15 years ago

  • Milestone changed from 3.0 to 3.1

If it's not a regression in 3.0 then let's move it to 3.1. There are similar tickets we can take care of at the same time.

#7 in reply to: ↑ 5 @hakre
15 years ago

Replying to ocean90:

I could reproduce it in 3.0 and 2.9 on my local install (windows, xampp) but not on my server install.

Good you wrote that, my report is based on windows as well.

#8 @hakre
15 years ago

  • Keywords reporter-feedback added

#9 @hakre
14 years ago

Related: #14292

#10 @hakre
14 years ago

Related: #14313

@hakre
14 years ago

#11 @hakre
14 years ago

I was able to fix the problem with the patch. The cause is that the regex used does not properly handle UTF-8 encoded strings. The \s character class is causing this again (see [12501]). Will scan core for more of these.

#12 @hakre
14 years ago

Scan finished, core has more places where \s is used on UTF-8 strings.

@hakre
14 years ago

Minified Patch

#13 @hakre
14 years ago

I reduced the code changes to the bare minimum. The first patch contains some code cleanups and on function did return a reference which was not necessary because the return value was an array.

#14 @wojtek.szkutnik
14 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords has-patch needs-testing gsoc added; reporter-feedback removed

I think you missed one ;)

#15 @hakre
14 years ago

Right, my patch did not focus on author. Had you run a test for authors?

#16 @hakre
14 years ago

  • Keywords needs-testing gsoc removed

Still looks good for 3.1 in my eyes.

#17 @scribu
14 years ago

  • Keywords needs-refresh added
  • Milestone changed from Awaiting Triage to 3.1

#18 @scribu
14 years ago

  • Owner set to scribu
  • Status changed from new to accepted

#19 @ryan
14 years ago

  • Milestone changed from 3.1 to Awaiting Review

#20 @westi
14 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from accepted to closed

Tested in trunk and this works fine for me.

#21 @hakre
14 years ago

Could not reproduce with trunk any longer:

Worked with PHP 5.2.14 (cli) (built: Jul 27 2010 10:43:58) on win 32.

Tried to get PHP 4 running to check if it's related to an older version (I remember it's a windows specific bug and I smell/assume this is related to some pcre lib version) but was not able to get PHP 4 running any longer and didn't want to downgrade PHP 5.2.

X-Ref: #16765

#23 @SergeyBiryukov
12 years ago

  • Component changed from General to Query

#24 @nacin
12 years ago

In [21862]:

Split tag names by [\r\n\t ] rather than \s to avoid that character class from eating characters. props rstern, SergeyBiryukov. fixes #21779. see #13413.

Note: See TracTickets for help on using tickets.