Hi, - first of all, thank you for a great module :)
I have a small problem with expired nodes, still showing up in views.
I've made a view with a certain node type, that requires an expire date.
Then I have set up a rule, to unpublish the content, when the node expires. And that's working like a charm, they expire just as they should.
But in my view, they still show up.
I have a filter with "content expired: no".
And I have 4 expired nodes, that shouldn't be displayed on this view, but they still show up.
I have worked around it with "content published: yes" instead, but since the expire possibility is there, it should work, I think.
I have tried to go the other way around, and wanted a list containing expired nodes only, but it came up empty.
This makes sense, since it doesn't work the other way around either.
Actually, my case is much the same as the one described here: http://drupal.org/node/584896
I thought it might have been fixed, but I couldn't find any issues adressing this - if this is a duplicate, I apologize.
For now, it's not a problem, since I'm the only one who's creating content of this type, but if I should later decide to open it up to other users, it would be nice, if the view would work - because then I didn't have to unpublish the expired nodes, I could simply remove them from the list through views. And the users would still be able to find and edit them, if needed. Only admins have the right to view unpublished content, so as it is now, a user with no administrations rights, would not be able to view the expired nodes. Hope it makes sense.
Maybe it could be in views, the problem is, although I don't think so.
I'm using an older version of views.
Views 6.x-2.11
Rules 6.x-1.4
Node expire 6.x-2.06
Comments
Comment #1
Nikki Aiuto commentedI'll go out on a limb here and suggest that the problem lies in node_expire.nodeapi.inc in node_expire_nodeapi().
I was experiencing a similar problem in which nodes got expired properly from node_expire hook_cron, which properly set the expired flag to 1. But by the end of the cron run, the flag got set to 0. After much probing, I found that hook_nodeapi was being invoked with op = 'update' as shown below:
Notice expired set to FALSE, regardless of the value of expire. Surely if expire is earlier than current time, the expired flag should be turned on, no? So, I changed that line to this:
and my expired nodes finally did show up as such. Mind you, I have not tested this in views, but since the view is examining the boolean value of expired, I have a strong feeling they are related.
And I want to also add thank you for writing this. It is key to our site.
Comment #2
Nafes commentedFixed in release 7.x-1.0-alpha3 (not in legacy mode). This part of workflow has been redesigned. Deletion of node_expire record on every node update has been removed.
Comment #3
Nafes commented