Looking at my schedule list, I see a node with unpublish date/time of "Thu, 03/11/2010 - 15:55" yet it is not unpublished. Cron has run many, many times since then, why would it not have been unpublished?

CommentFileSizeAuthor
#11 patch.txt1.91 KBeric-alexander schaefer

Comments

dolly nyc’s picture

I'm having the same problem. Nodes are not unpublishing as scheduled.

eric-alexander schaefer’s picture

I have no idea. If cron is running correctly the node should be unpublished. If the first chance for unpublishing passes without unpublishing (e.g. db connection problem) it should be unpublished at the next run.

Could you please check the logs (/admin/reports/dblog) after a cron run. Are there any errors reported or any other messages regarding the node?

nancydru’s picture

I haven't seen any errors reported on that node. Other nodes have successfully unpublished since then. I'm going to guess that someone went back in and re-published it after it was unpublished, but that was so long ago that the log is of no use (that's why #893272: Add revision when working a node would be really useful).

eric-alexander schaefer’s picture

If the node still contains the unpublish date, it *must* be unpublished at the next cron run. If it is not unpublished, there is something wrong. Can you get me the node-table row of that node?

nancydru’s picture

Hmm, it is unpublished now, but still listed in the Scheduler table:

Node

nid vid type language title uid status created changed comment promote moderate sticky tnid translate
3373 3373 blog Analyst Notes from IBM’s Maximo World 2007 51 0 1185398385 1268337563 2 1 0 0 0 0

Scheduler

nid publish_on unpublish_on
3373 0 1268337300
eric-alexander schaefer’s picture

Nodes that are unpublished keep their unpublish_on date. This happens if a node scheduled for unpublishing are unpublished manually.

What do you think, should the unpublish_on date be cleared on manual unpublishing? Is there a use case for keeping it?

nancydru’s picture

The problem that we have at my customer's location is that the admins see that still listed on the "scheduled" page and get worried that something is wrong. I don't think it's so much a matter of the node keeping its dates as it is that the list keeps showing it. But then, that's probably the same table, isn't it? In that case, yes, I would clear it (however, if you consider revisions, I would not create a new revision for that.)

eric-alexander schaefer’s picture

It's in the same table. You could edit the node(s) and clear the unpublish_on field.

eric-alexander schaefer’s picture

Note to self:

cron unpublishing:
- no limit on status=1
- unpublish nodes that are still published (status=1)
- delete

This way all nodes with unpublish_on value are removed from the scheduler table.

We could have the same problem with nodes scheduled for publishing that are published manually...

nancydru’s picture

That sounds like a good idea. It also sounds like a simple change to the query should do it.

eric-alexander schaefer’s picture

Status: Active » Needs review
StatusFileSize
new1.91 KB

Please test the attached patch

nancydru’s picture

Hopefully tomorrow; I have a busy evening.

eric-alexander schaefer’s picture

Have you had time to look into this?

nancydru’s picture

The patch looks right, but, no, I haven't tried it yet.

eric-alexander schaefer’s picture

Status: Needs review » Fixed
nancydru’s picture

Thanks, and I forgot to tell you it worked fine for me.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.