You are here: Foswiki>Tasks Web>Item5773 (06 Jul 2011, PaulHarvey)Edit Attach

Item5773: SEARCH on is near-impossible if cUID contains high-bit (or worse) chars

Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release: major
Applies To: Engine
Component: I18N, SEARCH
Reported By: TWiki:Main.KennethLavrsen
Waiting For:
Last Change By: PaulHarvey
Two things fail in TWiki 4.2 if login names are different from wiki names:

  • %SEARCH{"whatever" order="editby"}% sorts according to login names, which looks like "random" fixed in Item5443
  • %SEARCH{"TOPICINFO.*author= .%WIKINAME%." type="regex"}% should return all pages edited by the current user, but fails if there are login names which are different from wiki names.
    • The (anyway ugly) workaround %SEARCH{"TOPICINFO.*author= .%USERNAME%." type="regex"}% fails in our case where we have special characters in our login names

Both seem to be related to the fact that with 4.2, the "internal" user name as derived from the login name is being used for TWiki's system actions.

-- TWiki:Main/HaraldJoerg - 14 Mar 2008

From Cairo/4.0 to 4.1 the spec changed so instead of login ID the wikiname was stored in the TOPICINFO author field.

And in 4.2 we again changed to using canonical user ID (cUID)

There is no fix to this problem. This was a non backwards compatible change. We have learned now that changing was seems to be a harmless internal format has a consequence because TWiki apps dig information out of the META content - because there is no other alternative.

For 4.2.1 we probably change the cUID a little to address another issue. We have no alternative to this. So in order to resolve this we probably have to add an additional wikiname or displayname field to the META that people can search for. This requires an update of peoples META searches. And it requires an update scriptof some kind which people only have to use if they need this specific feature.

This may be possible in the scope of 4.2.1. But it can be deferred to 5.0 thus the Normal priority.

Better to delay the fix and get a proper fix than to rush things through.

To those that need a work around for 4.2.0 - change your search so it searches for BOTH the wikiname and the login name. That will work for most. If you use non A-Za-z0-9 login names you may have to find another way to search or to make an advanved piece of TML to create a cUID from the login name.

-- KennethLavrsen - 13 Jul 2008

I've re-titled this bug address the problem that remains: you can now QuerySearch quite reliably, but only if the cUID does not contain any characters which will be escaped using our dum_b e_s_caping format.

I'm not sure how to solve that: it seems we need to teach QuerySearch how to understand the cUID escaping for ?

Same goes for

-- PaulHarvey - 06 Jul 2011

ItemTemplate edit

Summary SEARCH on is near-impossible if cUID contains high-bit (or worse) chars
ReportedBy TWiki:Main.KennethLavrsen
Codebase 1.1.3, 1.1.3 RC1, 1.1.3 beta1, 1.1.2, 1.1.1, 1.1.0, 1.1.0 beta1, 1.0.10, 1.0.9, 1.0.8, 1.0.7, 1.0.6, 1.0.5, 1.0.5 beta1, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0, 1.0.0 beta3, 1.0.0 beta2, 1.0.0 beta1, trunk
SVN Range TWiki-5.0.0, Wed, 09 Jul 2008, build 17004
AppliesTo Engine
Component I18N, SEARCH
Priority Normal
CurrentState Confirmed
TargetRelease major
ReleasedIn n/a
Topic revision: r3 - 06 Jul 2011, PaulHarvey
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy