Search code examples
joomla

How to detect unpublished content in Joomla db?


I'll probably must create import script from Joomla.

How I can detect that selected content is not published?

I see three columns in jos_content table:

  • publish_up
  • publish_down
  • published

I need to be sure what these columns means, to know which content is published or not.

E.g. content item:

publish_up 2008-07-09 11:17:43
publish_down 2008-10-16 00:00:00
published 2008-07-09 11:17:43

is publishes or not?

I can't check in by myself in administration panel because something is broken in the website right know, so db is the only option for me now.


Solution

  • You have to look for 'state' values in the #_content table.

    According to https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_content/models/forms/article.xml, state values are:

    0 = unpublished

    1 = published

    2 = archived

    -2 = trashed / marked for deletion

    You also need to check the publish_up and publish_down dates.