keram
keram

Reputation: 2421

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:

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.

Upvotes: 9

Views: 5812

Answers (2)

effectica
effectica

Reputation: 790

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.

Upvotes: 22

Smolinsky Alexey
Smolinsky Alexey

Reputation: 51

'state' values can be: -1 = archived

Not right.. 2 = archived (Joomla 3.3.6)

Upvotes: 5

Related Questions