Bug 98716 - Can't create a content type with the name of a deleted type
Summary: Can't create a content type with the name of a deleted type
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other
Version: nightly
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Rafael H. Schloming
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks: rc0blockers
TreeView+ depends on / blocked
 
Reported: 2003-07-07 22:17 UTC by Jon Orris
Modified: 2014-12-01 23:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-07-09 19:59:35 UTC
Embargoed:


Attachments (Terms of Use)

Description Jon Orris 2003-07-07 22:17:16 UTC
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 22:18:35 UTC
Marked as blocking as I think it's a regression.

Comment 2 Jon Orris 2003-07-08 15:58:44 UTC
Oops. Had block order switched. 

Comment 3 Rafael H. Schloming 2003-07-09 15:04:12 UTC
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 19:00:32 UTC
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.