I am not sure what the issue is exactly, but I've been using the 6.x-1.6 version (and am currently using 6.x-1.x-dev, thinking maybe it had a fix...) and after some initial stumbling with getting my nodes to _publish_ (am/pm issue, fixed by using "Y-m-d H:i" as the date format) i'm now running into an issue where the nodes do not _unpublish_ - I have revisions enabled for the various content types, and i see the new revision being created by Anonymous (I assume that's an indication that it's actually "doing something") but the new revision is still Published.
I have tested on two different content types (blog entry, story) in a variety of ways
-- creating a node with a publish on date set in the future correctly publishes the node at that datetime
-- creating a node with publish and unpublish dates publishes (but does not unpublish)
-- creating a node with only an unpublish date (does nothing)
do you think it might have something to do with revisions? I have searched all the issues for this module and have not found anything that helps me with this issue. Wondering if anyone else has run into this problem.
I have a LOT of modules installed, but none of them (to my knowledge) would affect this one in this way (i know there were some issues with date_popup, which I am using, but it seems those issues have been resolved in the latest versions of this module.)
Any suggestions for things to try are welcome. Thank you!
Comments
Comment #1
eric-alexander schaefer commentedScheduler does not create a new revision. It only toggles the 'published' switch. I verified it just now since you can never be 100% sure. My test node was unpublished and there were no new revisions created.
Do you have modules installed that do create new revisions or change content otherwise?
Comment #2
wrockwood commentedNo, but the content type has "create new revision" enabled by default. perhaps if i disable that for the content types i wish to control using scheduler? I will give that a try and let you know. Thanks.
Comment #3
wrockwood commentedyeah, weird.. I just tested it with a blog entry. I disabled revisions-by-default for that content type, set it to unpublish at a certain time, confirmed that it was listed in /admin/content/node/scheduler and then after the scheduled unpublish time passed, viewed the blog entry and it was still published, but the unpublish date was cleared, and it was removed from the list in /admin/content/node/scheduler
very strange. I will dig further.
Comment #4
wrockwood commentedcron 12/01/2009 - 9:55am Cron run completed. Anonymous
action 12/01/2009 - 9:55am Saved Blog entry test 3 Anonymous
action 12/01/2009 - 9:55am Set Blog entry test 3 to unpublished. Anonymous
scheduler 12/01/2009 - 9:55am blog: scheduled unpublishing of test 3. Anonymous view
it's weird.. the log says it unpublished, right? but it is not unpublished. I wonder what could be conflicting...
Comment #5
wrockwood commentedWell I've done all the digging I can do. What info can I provide to help diagnose this? So weird...
Comment #6
eric-alexander schaefer commentedCan you take a look at the database? Can you run the following SQL statement:
SELECT status FROM `node` WHERE `nid`=42(Replace 42 with the id of the node that is supposed to be unpublished)
Comment #7
wrockwood commentedmysql> select status from `node` where `nid`=2198;
+--------+
| status |
+--------+
| 1 |
+--------+
1 row in set (0.00 sec)
This is a fresh blog entry which I created, set it to unpublish at a given time (12:50), confirmed it was in the list at "/admin/content/node/scheduler" and the log indicates it was unpublished, yet it is still published.
cron 12/01/2009 - 12:50pm Cron run completed. Anonymous
action 12/01/2009 - 12:50pm Saved Blog entry Testing the scheduler module Anonymous
action 12/01/2009 - 12:50pm Set Blog entry Testing the scheduler module ... Anonymous
scheduler 12/01/2009 - 12:50pm blog: scheduled unpublishing of Testing the ... Anonymous view
content 12/01/2009 - 12:49pm blog: added Testing the scheduler module. wjr view
user 12/01/2009 - 12:49pm Session opened for wjr. wjr
Comment #8
wrockwood commentedI just ran another test, created a blog entry with a publish on and unpublish on date (5 minutes apart, cron runs every 5 minutes) and so far it has successfully created an unpublished node, published it at the correct time, and now I am waiting for it to (fail to) unpublish.
I checked the database, and the status went from 0 to 1 as expected when the "publish" action triggered. I do not know why it isn't changing from 1 to 0 when the unpublish action triggers, though... so odd.
edit: as expected, it did not unpublish the node :(
Comment #9
eric-alexander schaefer commentedHmm. The status should go back to 0. As you can see in #4, scheduler first triggers the unpublish action, then the save action. Looks loke the save action is not carried out correctly.
Can you please list all activated modules + versions and the version of drupal itself?
Comment #10
wrockwood commentedSure, here goes...
Drupal version: 6.14
Mysql: 5.0.51a (Debian)
PHP: 5.2.6-1+lenny3 (Debian) (Needs an upgrade)
Webserver: Apache/2.2.9
Modules installed:
abuse 6.x-1.1-alpha1
add another 6.x-1.4
add to any 6.x-2.4
advanced help 6.x-1.2
announcements 6.x-1.3
apture 6.x-1.7
browscap 6.x-1.1
calendar 6.x-2.x-dev (2009-nov-20)
captcha 6.x-2.0
contemplate 6.x-1.1
CCK 6.x-2.6
date 6.x-2.4
read more link 6.x-3.0
external links 6.x-1.8
fckeditor 6.x-2.0-rc2
swf tools 6.x-2.5
frontpage slideshow 6.x-1.0-beta2
global redirect 6.x-1.2
gmapez 6.x-1.2
image 6.x-1.0-beta3
image cycle 6.x-1.1
image fupload 6.x-3.x-dev (2009-sep-28)
image resize filter 6.x-1.6
IMCE 6.x-1.3
image assist 6.x-2.0-alpha4
job queue 6.x-3.0
jquery ui 6.x-1.3
jquery update 6.x-2.x-dev (2009-apr-23)
lightbox2 6.x-1.x-dev (2009-nov-22)
link checker 6.x-2.4
login destination 6.x-2.5
nice menus 6.x-2.x-dev (2009-may-06)
override node options 6.x-1.9
path redirect 6.x-1.0-beta5
pathauto 6.x-2.x-dev (2009-nov-12)
piwik - web analytics 6.x-1.1
printer, e-mail and pdf versions 6.x-1.10
quickmenu 6.x-1.4
recaptcha 6.x-1.3
scheduler 6.x-1.x-dev (2009-nov-28)
search 404 6.x-1.7
shoutbox 6.x-1.0 (unused)
site map 6.x-2.x-dev (2009-oct-14)
taxonomy redirect 6.x-1.3
themekey 6.x-1.2-beta7
token 6.x-1.12
views 6.x-2.7
views node feed 6.x-1.x-dev (2009-sep-17) (unused)
webform 6.x-2.9
windows live messenger 6.x-1.2 (unused)
Job Queue is the only one that's raising red flags with me right now, but it doesn't make sense that the node would publish but not unpublish... I specifically do NOT have 'token actions' enabled, which extends the core 'triggers' functionality.. not sure if there could be some weird interaction there though...
If you'd like me to add some debugging watchdog() stuff to the module so I can find out what various variables are set to at runtime, I can do that. Just let me know :)
Thanks so much for your help so far! :)
edit: i turned off and uninstalled job queue, but the results are the same. it publishes but won't unpublish *groan*
Comment #11
wrockwood commentedOK! I made some progress! Following another hunch, I found the module that was conflicting.
Culprit: override node options 6.x-1.9
I uninstalled this module and BAM it just worked. Currently running the -dev scheduler code and it's flawless. I am so sorry to have opened this issue, but I greatly appreciate the help you've given. You've been most helpful. I haven't looked into exactly _why_ it is conflicting, but that's not entirely important to me. Losing the "override node options" module is a small price to pay (I had planned to eliminate the need for it in the future, anyhow.. so all this does is push up my timetable on that ;)
Setting to closed.
Comment #12
eric-alexander schaefer commentedNothing to be sorry about. It could have been a scheduler bug after all.
I will have a look at the "override node options" module. Maybe there is a way to prevent such conflicting behaviour.
Thanks for reporting back.