Bug 98716 - Can't create a content type with the name of a deleted type
Can't create a content type with the name of a deleted type
Status: CLOSED RAWHIDE
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rafael H. Schloming
Jon Orris
:
Depends On:
Blocks: rc0blockers
  Show dependency treegraph
 
Reported: 2003-07-07 18:17 EDT by Jon Orris
Modified: 2014-12-01 18:13 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-07-09 15:59:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jon Orris 2003-07-07 18:17:16 EDT
Description of problem:
If I create a ContentType called TestType, delete it, and create it again, I get
an exception. This appears to be due to the object type not being cleared from
the persistence Metadata.

java.lang.IllegalArgumentException: duplicate key: com.arsdigita.cms.TestType
	at com.arsdigita.persistence.proto.metadata.Mist.add(Mist.java(Compiled Code))
	at com.arsdigita.persistence.proto.metadata.Root.addObjectType(Root.java:93)
	at com.arsdigita.metadata.DynamicObjectType.(DynamicObjectType.java:189)
	at com.arsdigita.metadata.DynamicObjectType.(DynamicObjectType.java:137)
	at com.arsdigita.cms.ui.type.CreateType.process(CreateType.java:264)
	at com.arsdigita.bebop.FormSection.fireProcess(FormSection.java:491)
	at com.arsdigita.bebop.FormSection$4.process(FormSection.java:465)
	at com.arsdigita.bebop.FormModel.fireFormProcess(FormModel.java:478)
	at com.arsdigita.bebop.FormModel.process(FormModel.java:345)
	at com.arsdigita.bebop.Form.process(Form.java:440)
	at com.arsdigita.bebop.Form.respond(Form.java:281)
	at com.arsdigita.bebop.PageState.respond(PageState.java:348)
	at com.arsdigita.bebop.Page.process(Page.java:695)
	at com.arsdigita.bebop.Page.process(Page.java:677)
	at com.arsdigita.bebop.Page.buildDocument(Page.java:731)
	at com.arsdigita.cms.dispatcher.CMSPage$1.excurse(CMSPage.java:262)
	at com.arsdigita.cms.CMSExcursion.run(CMSExcursion.java:71)
	at com.arsdigita.cms.dispatcher.CMSPage.dispatch(CMSPage.java:270)
	at com.arsdigita.cms.dispatcher.CMSDispatcher.dispatch(CMSDispatcher.java:257)
	at
com.arsdigita.cms.dispatcher.CMSDispatcher.chainedDispatch(CMSDispatcher.java:337)
	at com.arsdigita.dispatcher.DispatcherChain.dispatch(DispatcherChain.java:74)
	at
com.arsdigita.cms.ContentSectionServlet.doService(ContentSectionServlet.java:134)
Comment 1 Jon Orris 2003-07-07 18:18:35 EDT
Marked as blocking as I think it's a regression.
Comment 2 Jon Orris 2003-07-08 11:58:44 EDT
Oops. Had block order switched. 
Comment 3 Rafael H. Schloming 2003-07-09 11:04:12 EDT
I don't believe this has ever worked since there is in fact no way to delete an
object type, and there never has been. The delete link on the type detail pane
actually just removes the item from the section and so it no longer appears in
the list, but it doesn't actually get deleted. I've improved the validation code
so that we do detect this situation and report it as an error to the user rather
than throw an exception, but the behavior is still undesirable since if you
create an object type and then delete it, you will never be able to create an
object type with that name again.
Comment 4 Richard Li 2003-07-09 15:00:32 EDT
Given comments above and non-regression status, marking QA_READY. Deleting
content types is probably uncommon on a prod system and something we're not
going to support right now.

Note You need to log in before you can comment on or make changes to this bug.