DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

How to identify unpublished content

 5 Replies
 2 Subscribed to this topic
 40 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 16
New Around Here

We recently moved from Evoq Content to DNN Community. In Evoq, there was a publish button at the bottom of the page that was visible when some content was not published. There is no such button in DNN Community. While I can see the advantage of being able to publish individual modules on a page, there is not a quick and easy way to see what is and isn't published. 

While this is mainly a training issue, it is easy to forget to hit the publish button in the action menu. 

Does anyone have a trick to see what modules are not published on a page? Is there an SQL statement that will show me what modules are not published?

Senior Member
Posts: 1322
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!

I have done that a long time ago, here's what I noted about the process:



/-- To see the workflows that are available:

SELECT * FROM ContentWorkflows

 

/-- Make note of the ContentTypeID for Tabs

SELECT * FROM ContentTypes

 

/-- Knowing the WorkflowID, we can find the specific states the page is in by taking note of StateID

/-- find out the state of the current pages

SELECT * FROM ContentWorkflowStates

 

 

/--Shows all pages (Tab = content type 1) in a certain state of a workflow

SELECT * FROM ContentItems WHERE StateID = 1 AND ContentTypeID = 1

 

/-- now you know which pages need to have the workflow updated.  You can go to each one individually and update or run the scripts below

 

/-- Make note of the Portald. 

Select * from PortalAlias

 

/-- Note I was told to run these next two commands here but I also had to run it after updating the states so I suspect they could just be run at the end

/-- First you will have to run a script to publish every page.

Update Tabs Set HasBeenPublished = 'True' Where PortalId = 0

 

/--Then you can to run a script to publish the latest version of each page.

Update TabVersions Set IsPublished = 'true' Where TabId in (Select TabId From Tabs Where PortalId = 0)

 

/-- Then you will need to go through EVERY workflow with a draft state or in a non-published state and manually set the StateId to a published state according to that correct workflow

/-- Shows all pages in a certain state of a workflow) 7 is a draft state in our current workflow

 

SELECT * FROM ContentItems WHERE StateID = 7 AND ContentTypeID = 1 AND TABID in (SELECT TabID From Tabs Where PortalId = 0)

 

/-- StateId of 11 is a published state in the current Content Approval workflow

UPDATE ContentItems SET StateId = 11 WHERE StateID = 9 AND TABID in (SELECT TabID From Tabs Where PortalId = 0)

 

/--- ad to run these two steps again after updating the SteateID

Update Tabs Set HasBeenPublished = 'True' Where PortalId = 0

Update TabVersions Set IsPublished = 'true' Where TabId in (Select TabId From Tabs Where PortalId = 0)

FYI, this is from 5 years ago I think, so: backup and try ;-)

Senior Member
Posts: 1322
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!

I did this but it's a long time ago.
Here's what I noted about the process:



/-- To see the workflows that are available:
SELECT * FROM ContentWorkflows 

/-- Make note of the ContentTypeID for Tabs
SELECT * FROM ContentTypes 

/-- Knowing the WorkflowID, we can find the specific states the page is in by taking note of StateID
/-- find out the state of the current pages
SELECT * FROM ContentWorkflowStates

/--Shows all pages (Tab = content type 1) in a certain state of a workflow
SELECT * FROM ContentItems WHERE StateID = 1 AND ContentTypeID = 1

/-- now you know which pages need to have the workflow updated.  You can go to each one individually and update or run the scripts below
/-- Make note of the Portald. 
Select * from PortalAlias

/-- Note I was told to run these next two commands here but I also had to run it after updating the states so I suspect they could just be run at the end
/-- First you will have to run a script to publish every page.
Update Tabs Set HasBeenPublished = 'True' Where PortalId = 0

/--Then you can to run a script to publish the latest version of each page.
Update TabVersions Set IsPublished = 'true' Where TabId in (Select TabId From Tabs Where PortalId = 0)

/-- Then you will need to go through EVERY workflow with a draft state or in a non-published state and manually set the StateId to a published state according to that correct workflow
/-- Shows all pages in a certain state of a workflow) 7 is a draft state in our current workflow
SELECT * FROM ContentItems WHERE StateID = 7 AND ContentTypeID = 1 AND TABID in (SELECT TabID From Tabs Where PortalId = 0)

/-- StateId of 11 is a published state in the current Content Approval workflow
UPDATE ContentItems SET StateId = 11 WHERE StateID = 9 AND TABID in (SELECT TabID From Tabs Where PortalId = 0)

/--- ad to run these two steps again after updating the SteateID
Update Tabs Set HasBeenPublished = 'True' Where PortalId = 0

Update TabVersions Set IsPublished = 'true' Where TabId in (Select TabId From Tabs Where PortalId = 0)

FYI, this is from 5 years ago I think, so: backup and try ;-)

New Around Here
Posts: 16
New Around Here

Thanks for the reply. We're running a live site with 6,000 pages over 30 portals so we can't make across the board changes without looking at each page and ensuring the content is ready to go live. But, this should help me track down what is and isn't published.  

This is starting to look like a feature request. It would be nice to have a simple visual cue when you are in edit mode that would show if content is published or not. 

-s 

Veteran Member
Posts: 349
Veteran Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
MVP
MVP
You're an MVP!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
As a sidenote, this will be implemented in DNN10 (Platform) and there is a lot of information about the inner workings in this issue https://github.com/dnnsof...Platform/issues/6115 and in the related Pull Request.
Senior Member
Posts: 1607
Senior Member
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!

Hello Everyone: 

FYI, this feature has been added to the Upendo DNN Page Manager.  😎 

Upendo DNN Page Manager 1.2

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved