Item1224: Underscores in topic name with WebTopicCreator are not possible

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Reported By: EugenMayer
Waiting For:
Last Change By: KennethLavrsen
TWiki bug topic: Item6209 ( src - history )

--

You cannot create topics with underscores in the names like Foo_Bar_Fooo with WebCreateTopic..even if you check "AllowNoWikiWord"...while you later still can rename it to have this name.

Seems like its simpy a JS validation problem, which does not respect the checkbox and simply converts the name to a WikiWord all the time

-- EugenMayer - 09 Mar 2009

This has just been reported again as Item9195

There's some rather over-enthusiastic Javascript at work.

This is really crap; confirmed, and raised to Urgent status for 1.1 release.

-- CrawfordCurrie - 25 Jun 2010

Yes - this has come up multiple times in support questions as well. The JavaScript validations ought to match the same transform that is done by core when converting a bracketed spaced link into a valid topic name, allowing underscores, and some other limited punctuation permitted by core. It should also pick up $Foswiki::cfg{NameFilter} so that local preferences are uniformly enforced.

-- GeorgeClark - 26 Jun 2010

I've added a new PREFERENCE variable NAMEFILTER which copies the cfg{NameFilter} regex and passes it through EXPORTEDPREFERENCES to javascript. Added a new function filterPunctuation in addition to removePunctuation and changed webtopiccreator.js to follow the same rules as Render.pm. If the allow non-WikiWord checkbox is checked, then it Converts filtered punctuation to spaces, then remove spaces capitalizing the following letters to build a wiki word. If allow nonWikiWord is not checked, then the spaces and punctuation are all stripped as before.

I found one issue probably with our defaults. NameFilter default does not include #. But # is interpreted as an anchor and the Topic name is always truncated prior to the #. So we should probably add # to the NameFilter regex by default.

-- GeorgeClark - 29 Jun 2010

So...how would I access those changes you've made and incorporate them back into my site?

-- RobertWall - 30 Jun 2010

The changes are all listed at the bottom of this page, and can be reached by clicking on the "checkins". Unfortunately the changes are based upon other changes to version 1.1 of Foswiki and would need quite a bit of rework to fit them onto 1.0.9. 1.1 is getting close to a beta release.

-- GeorgeClark - 02 Jul 2010

ItemTemplate edit

Summary Underscores in topic name with WebTopicCreator are not possible
ReportedBy EugenMayer
Codebase 1.0.9, trunk
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:3f785aedfe37 distro:d3b4ae8cbb68 distro:701bd6ad5953 distro:105d49352b89 Rev 7964 not found distro:cb8455854406 distro:8ec422b85bfb
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r15 - 04 Oct 2010, KennethLavrsen
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