After extending doesn’t return to published state automatically

CoPut - March 22, 2008 - 11:45
Project:Auto Expire
Version:6.x-1.0-rc1
Component:Code
Category:bug report
Priority:normal
Assigned:marcvangend
Status:closed
Description

On expiration, a node becomes unpublished, but after extending doesn’t return to published state automatically. This looks confusing and I think it should return to published state or shouldn’t become unpublished in the first place.

#1

mariuss - March 25, 2008 - 01:31
Assigned to:Anonymous» mariuss

#2

CoPut - May 30, 2008 - 04:06
Status:active» reviewed & tested by the community

Here I use most primitive solution: I publish it back when node going to be extended. Actually I'm not sure if it brings some side effects or not. Maybe publishing and unpublishing nodes is not very good way to hide expired nodes from users?

AttachmentSize
auto_expire-237452-2.patch 714 bytes

#3

marcvangend - June 7, 2009 - 11:53
Assigned to:mariuss» marcvangend
Status:reviewed & tested by the community» needs work

I think that publishing and unpublishing is the best way to hide expired nodes. I see no need to create a module-specific flag when nodes already have this functionality built in.

The 'primitive' solution (setting status = 1 directly in the database, as used in the patch above) has the advantage of better performance (at least in theory, I don't know if anyone would notice). The other method would be to do a node_load, set $node->status to 1 and do a node_save. There are two advantages to that approach: since hooks are invoked, other modules get a chance to act on the (un)publishing of a node. It would also mean that we don't have to worry about the difference between mysql and postgresql queries. I prefer the second method.

#4

xamount - June 8, 2009 - 03:04

subscribe

#5

xamount - June 8, 2009 - 03:12
Status:needs work» reviewed & tested by the community

patch tested by myself...looks good to be committed.

#6

marcvangend - June 9, 2009 - 22:33
Status:reviewed & tested by the community» patch (to be ported)

Patch committed to the Drupal 5 branch, still to be ported to D6.

#7

marcvangend - June 28, 2009 - 23:22
Version:5.x-1.0» 6.x-1.0-rc1
Status:patch (to be ported)» fixed

included 6.x-1.0-rc1.

#8

System Message - July 12, 2009 - 23:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.