10

I am trying to delete a Publication that is no longer required.

Any localized items within the Publication have been unlocalized, and the Publication has also been unpublished.

When I try and delete the Publication from the CME, I am getting the following error message:

(80040332) It is not possible to delete a Publication that contains published items. Unable to delete Publication (tcm:0-24-1).

Tridion.ContentManager.Data.AdoNet.Sql.SqlDatabaseUtilities.ExecuteNonQuery(StoredProcedureInvocation) Tridion.ContentManager.Data.AdoNet.IdentifiableObjectDataMapper.Tridion.ContentManager.Data.IIdentifiableObjectDataMapper.Delete(TcmUri) Tridion.ContentManager.IdentifiableObject.Delete(DeleteEventArgs) Tridion.ContentManager.IdentifiableObject.Delete() Tridion.ContentManager.BLFacade.IdentifiableObjectFacade.Delete(UserContext,String) Publication.Delete

Checking in the database, the following query doesn't return any rows.

SELECT ID, PUBLICATION_TARGET_ID, PUBLICATION_ID, ITEM_REFERENCE_ID, STATE, STATE_CHANGE_DATE, TRUSTEE_ID, COMPONENT_TEMPLATE_REF_ID
FROM ITEM_STATES
WHERE (PUBLICATION_ID = 24) AND (STATE <> 0)

This says to me that everything for this Publication has been unpublished, so I can't see why I am getting this error and am unable to delete the Publication?

I can't see anywhere a list of items that the CME thinks are published in this Publication. Is it possible to get a list somehow, although according the database, there aren't any!

Any ideas?

  • 4
    Check the PUBLISH_STATES table too. – Nuno Linhares Apr 11 '13 at 9:09
  • 3
    While it isn't actually recommend to touch the database, read only queries are of course relatively harmless, but then you indeed need to know enough of the data model to check the right tables. As @Nuno mentioned, you need to check both the ITEM_STATES and PUBLISH_STATES table, but its better to use the TOM API as @robrtc mentions in his answer. – Bart Koopman Apr 11 '13 at 10:26
  • 3
    Thank you Bart and Nuno for your comments. Whilst I was checking the ITEM_STATES table, the PUBLISH_STATES table did indeed make reference to published items. I do agree of course that running an update script on the database to reset the publish state is not recommended, but I have now managed to find the rogue items, and have removed them from the CME, and the publication has been deleted! – Stef Robinson Apr 11 '13 at 13:21
10

Instead of playing through the DB, I would recommend you using the Advanced Search Feature in CME. In your CME, select the publication -> go to the Advanced Search option -> and filter the search based on Publish Status as shown below:

enter image description here

Alternatively, you may search for everything available in the publication and check for "Blue Globe" symbol (The symbol to notify whether the item is published or not) across them.

If there are any such item available, un-publish them and ensure the Blue Globe is disappear else identify what is the root cause behind non-disappearance of the symbol.

Once your publication have items which do not carry a Blue Globe symbol, you will be able to delete the publication.

PS:

If you are opting for the first option (Filtered Advanced Searching), then ensure you have done the re-indexing as mentioned here

10

Try running a script to set all items to an unpublished status. It might be you have some templates that are published? See this answer for the script: https://stackoverflow.com/questions/11327484/how-to-set-ispublishedto-status-on-a-tridion-component

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.