9

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.

keram
  • 2,321
  • 4
  • 24
  • 29

2 Answers2

22

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.

Erik Erskine
  • 103
  • 2
effectica
  • 780
  • 6
  • 12
  • Thanks I ma blind, I can't accept your answer right know. I have also -2 and - 1 values, do you know what them mean? – keram Aug 09 '12 at 16:03
  • 2
    @keram: 0 = unpublished 1 = published -1 = Archived -2 = marked for deletion – effectica Aug 09 '12 at 16:06
  • 1
    If `state` is `1`, can I be confident that the article is also between the `publish_up` and `publish_down` dates? – Flimm Apr 20 '16 at 15:47
  • @filmm: no, you can't. You have also to check this condition before showing an article – giovannim Sep 05 '18 at 10:39
5

'state' values can be: -1 = archived

Not right.. 2 = archived (Joomla 3.3.6)

  • I realised that the hard way..trusted on the answer above ;-), and found out now looking at the database. – AndyZ Jun 04 '15 at 06:03