When you need to change the content status via the database, you need to change more then just the content_status column in the content table. This process may need to be run in cases where a content item is displaying an error in the workarea, or the status is not in a recognized state. The following script will fix the issue by updating the content item's status as well as associated tables.
Content may become stuck in a particular status if someone may leave the company and you can't force approve it.
Before you make any changes to the database please make a back up! Note that this will change the content_status to "A" (Approved)
DECLARE @content_id bigint,@content_language INT --------------!! UPDATE THE FOLLOWING VARIABLES AS NEEDED !!-------------------- SET @content_id=30 SET @content_language=1033 --------------!! DO NOT CHANGE ANYTHING BELOW HERE !!-------------------- DELETE FROM approval_status_tbl WHERE content_id=@content_id AND content_language=@content_language DELETE FROM approval_tbl WHERE content_id=@content_id AND content_language=@content_language DELETE FROM save_meta_tbl WHERE save_id in (select save_id FROM save_tbl WHERE content_id=@content_id AND content_language=@content_language ) DELETE FROM save_tbl WHERE content_id=@content_id AND content_language=@content_language DELETE FROM edit_meta_tbl WHERE content_id=@content_id AND content_language=@content_language DELETE FROM content_edit WHERE content_id=@content_id AND content_language=@content_language WAITFOR DELAY '00:00:05' UPDATE content SET content_status='A' WHERE content_id=@content_id AND content_language=@content_language GO
Please sign in to leave a comment.