You are here: Foswiki>Tasks Web>Item774 (17 Jan 2009, CrawfordCurrie)Edit Attach

Item774: Can't create a new autoinc'ed topic if autoinc0 already exists

pencil
Priority: Urgent
Current State: No Action Required
Released In:
Target Release:
Applies To: Engine
Component:
Branches:
Reported By: MichaelDaum
Waiting For:
Last Change By: CrawfordCurrie
How to reproduce:

  1. create a new topic TestTopicFoo
  2. rename TestTopicFoo to TestTopicAUTOINC0 if it doesn't exist already
  3. go to Sandbox
  4. add
    <input type="hidden" name="onlynewtopic" value="on" />
    to the second form
  5. try to create a new autonumbered topic
  6. you get error: topic TestTopicAUTOINC0 already exists

Well you don't wanted to create TestTopicAUTOINC0 but one that gets a new number automatically.

Haven't checked same issue on TestTopicXXXXXXXXX

-- MichaelDaum - 15 Jan 2009

The form in Sandbox has an "edit" action. AUTOINC is not expanded until "save". So the behaviour you describe is as designed; when you edit, you are editing a topic called TestTopicAUTOINC0, and if onlynewtopic is set, it will apply that constraint. Only when the edit is saved is TestTopic0 created.

I agree this is not good design, but it's the way AUTOINC was done. There is a tacit assumption (not altogether unreasonable) that no-one will be silly enough to create a topic with AUTOINC0 in the name.

Behaviour as designed; no change required (though you may want to open a feature request to get the behaviour redesigned)

-- CrawfordCurrie - 17 Jan 2009

ItemTemplate edit

Summary Can't create a new autoinc'ed topic if autoinc0 already exists
ReportedBy MichaelDaum
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component
Priority Urgent
CurrentState No Action Required
WaitingFor
Checkins
ReleasedIn
Topic revision: r2 - 17 Jan 2009, CrawfordCurrie
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