I must have implemented this wrong. I set the expiry date on a story to a date a few days ago. I waited and sure enough, it shows up in the expired content list but it is still published. The expired lists does not seem to let me delete it do anything other than edit the actual node.
I chose the option to have it expire immediately on a specified date (not modified date) and not to send out email.
I would have expected the node to be unpublished, only show when admin looks at unpublished list and then select all and delete them...
Maybe I am missing the point of the this module.
All I want is for specified content to expire, unpublish and then get purged (deleted) from the database along with any of their attachments etc...
I seem to have it installed properly... as all the options seem to work.
I am using 5.2 (maybe there is an issue with the new version)
Thanks guys...
Comments
Comment #1
astoltz commentedIf automatic unpublishing is set to immediate, and you're seeing the expired articles in that list, then you did do everything right. The one thing you should check is to make sure cron is running. You can tell that by checking the status report page in the logs section.
Also, are you running under MySQL or PostgreSQL. It would be helpful if you could check your Drupal logs as well to see if you can see any notices or unpublishings happening. Please check the php errors as well (which also show up under Drupals logs).
I'll do some testing within the next 24 hours to ensure the unpublishing function is still working properly in the latest beta.
Comment #2
bgordon commentedYes, the auto-unpublish is set to immediate. They show up in the regular content view as published after the date and time required. They also show up in the new view tab.
I have poormanscron module running every 15 minutes (since I have some aggregator feeds that I like to keep up-to-date). I have tried to run the regular cron.php from the url and nothing changes in the expiry.
I am not sure where to look for the logs you are talking about... where are the drupal error logs and php logs. Thanks for looking into this for me. It is a great feature once I get it going :)
Comment #3
astoltz commentedLogs are found on ?q=admin/logs/watchdog
The status report page is found on ?q=admin/logs/status (This will tell you what database you're running).
I did a fresh install on my dev box and everything worked as expected so knowing what you're environment is like will definitely help out in figuring out what's wrong.
Comment #4
bgordon commentedOk..
I just ran cron.php and update.php after putting a criticl update for cck in. Now I get that access denied again when trying to access http://www.mysite.com/admin/content/node/outdated
This just happened since I was able to access it before running update.php and cron.php (not sure which one killed it)
Comment #5
astoltz commentedIt sounds more like the cache got flushed. The two requirements to view that page are:
* The automatic unpublishing has to be set to anything other than "Immediate". (The page is uselesss on Immediate since nothing will ever show up.)
* You have to have the 'administer nodes' access permissions.
After running cron again, did the pages unpublish themselves?
Comment #6
bgordon commentedFound this in watchdog:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(NOW(), expire) >= 0 AND expiremode != "none"' at line 1 query: SELECT nid FROM node_expire WHERE DATEDIFF(NOW(), expire) >= 0 AND expiremode != "none" in /mounted-storage/home28b/sub004/sc25930-UOBX/www/includes/database.mysql.inc on line 172.
Severity error
Status says:
Drupal 5.2
Configuration file Protected
Cron maintenance tasks Last run 0 sec ago
You can run cron manually.
Database schema Up to date
Drupal core update status Up to date
File system Writable (public download method)
GD library bundled (2.0.34 compatible)
Module update status Up to date
MySQL database 4.0.26
PHP 5.2.3
Unicode library PHP Mbstring Extension
Web server Apache
Comment #7
astoltz commentedThat error is caused by the use of an SQL command added in MySQL v4.1.1. That is fixed in the latest beta release (it was fixed with bug #150006). Are you running the latest beta?
Comment #8
bgordon commentedSorry to be so thick... the latest beta of what? I am using 5.x-1.1 2007-May-12 15.21 KB version of node expire and my host is presumably not running a beta version of mysql since they serve thousands of customers... What should I be looking for...
Comment #9
astoltz commentedThe latest beta of node_expire. The particular error you're seeing was fixed on 6/12/2007.
Comment #10
bgordon commentedOk... where do I find that... the project has an official and development release... I don't see any links to a beta version... maybe I am on the wrong drupal download page?
Comment #11
bgordon commentedOk.. I am assuming that dev=beta
I dl and ran update.php
Here is the error:
user warning: Can't DROP 'nid'. Check that column/key exists query: ALTER TABLE node_expire CHANGE nid nid INT( 10 ) NOT NULL, ADD expiresec VARCHAR(10) NOT NULL, ADD expiremode ENUM( 'date', 'onupdate', 'none' ) NOT NULL DEFAULT 'none', ADD isroot TINYINT( 1 ) NOT NULL DEFAULT '0', ADD lastnotify INT( 10 ) NOT NULL DEFAULT '0', DROP INDEX nid, ADD PRIMARY KEY (nid); in /mounted-storage/home28b/sub004/sc25930-UOBX/www/includes/database.mysql.inc on line 172.
The following queries were executed
node_expire module
Update #1
Failed: ALTER TABLE {node_expire} CHANGE nid nid INT( 10 ) NOT NULL, ADD expiresec VARCHAR(10) NOT NULL, ADD expiremode ENUM( 'date', 'onupdate', 'none' ) NOT NULL DEFAULT 'none', ADD isroot TINYINT( 1 ) NOT NULL DEFAULT '0', ADD lastnotify INT( 10 ) NOT NULL DEFAULT '0', DROP INDEX nid, ADD PRIMARY KEY (nid);
Update #2
ALTER TABLE {node_expire} CHANGE isroot isroot TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0', CHANGE lastnotify lastnotify INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', ADD INDEX (expire), ADD INDEX (expiremode), ADD INDEX (lastnotify);
Comment #12
astoltz commentedYep, that error was fixed too. "Fixed function names for upgrader which caused node_expire not to be detected."
Because you already had the module installed when the typo existed, you'll get the error. So long as the second one ran successfully, you'll be fine and it can be ignored.
Comment #13
bgordon commentedOk... after a cron, it seemed to unpublish my article! Woo Hoo!
The only issue now, is that stupid access denied error when I try to hit that view from the content page. I have it set to instantly. No permissions set on module. I am logged in as admin (user1). I should not be denied anything I assume.
I can see all unpublished content from the regular content view. I can then mass-delete it periodically. I am happy with the auto-unpublish. I just don't understand why I cannot see the view you made which takes me to only unpublished items.
Finally... is there any way you can add a feature to this cool mod that will auto-delete the unpublished content? A little tick-box that says unpublish and delete instantly to the node-type defaults? That would truly be awsome for anyone who wants to use your mod to manage stale data. There does not seem to be any other way to accomplish this and having to log in, search, select and delete for each site we manage would be a pain in the behind.
Comment #14
astoltz commentedAs stated before, that page isn't available when you set the nodes to be published immediately. (The page has no use in that case.). If you set it to anything else (1 day, for example), you should be able to access it with no problems.
Comment #15
bgordon commentedGreat... I recall that way up there now... sorry. Its all good. Think about that auto-purge / delete option. I would be happy to pay for that addition if you could provide me the code and where to put it each time I upgrade to keep it working over time. I don't know much about module coding but I can cut 'n paste with the best of them!
Comment #16
astoltz commentedI can definitly work on adding that option too. The main reason I never did is people tend to get a little upset when your program ends up deleting something they wanted to keep. Unpublishing gets the job done, but puts it in the hands of the admin to decide what they want to do with it afterwards.