Closed (fixed)
Project:
Node expire
Version:
master
Component:
Miscellaneous
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
27 Feb 2011 at 16:51 UTC
Updated:
20 Nov 2013 at 19:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Shadlington commentedChanged title
Comment #2
clashar commented+1
Comment #3
tesmon commentedSubscribe!
Comment #4
bennos commentedSubscribe!
Comment #5
Anonymous (not verified) commentedthis would be great!
Comment #6
tesmon commentedSubscribe
Comment #7
eileen commented+1
Comment #8
giorgio79 commentedIn case this module is not ported can we achieve the same with Rules for example?
Comment #9
jon nunan commented#8 this module uses rules already. Basically it creates a rules event that will only be evaluated on expired nodes every cron run. You might be able to get similar functionality with straight rules and a loop over every node, but that would be very bad performance wise as you only want to be evaluating expired nodes.
I've started work on a port of this for D7 with some changes. So far I've converted it to a D7 field and tied a taxonomy term to each node_expire field. This term means you can actually have different rules apply to the same node at different times by using this term as a condition in your rules. It will allow multiple actions to be tied to a node. e.g. in 2 weeks from now send an email and in 3 weeks un-publish the node.
I'm also adding actions so that the term and expiry date can be changed by rules, which means you could make chains of node_expire rules.
Later on down the track I'd like to see this not only be for nodes, instead make it more of an 'entity date action' so that similar things could be done for user & taxonomy entities as well.
Comment #10
Shadlington commentedHuh. That sounds really interesting meatsack.
That extra flexibility would be brilliant.
Looking forward to being able to test it out!
Comment #11
anavarreSubscribe
Comment #12
acarpio commentedsub
Comment #13
cbrasfield commentedsub
Comment #14
giorgio79 commentedHow about making it into a generic Entity Expire module, that could replace this and Role Expire module as well? :)
http://drupal.org/project/role_expire
Comment #15
skwashd commented@giorgio79 roles aren't entities in D7. I hope they will be in D8. I do like the idea of a generic expiration framework for Drupal.
Comment #16
rogical commented+1
Comment #17
BenK commentedSubscribing
Comment #18
itkadmin commentedsubscribe
Comment #19
LandonAB commentedSubscribe
Comment #20
Vc Developer commentedSubscribe
Comment #21
sslider999 commentedsub
Comment #22
mhawker commentedSubscribe
Comment #23
choy commentedsubscribe
Comment #24
emilekott commentedsubscribe
Comment #25
ivoryhotfingers commentedsubscribe
Comment #26
snupy commentedsubscribe
Comment #27
SharonD214@aol.com commentedsubscribe
Comment #28
latte commented+1 subscribe
Comment #29
wesnoel commentedYeah +1
Comment #30
liliplanet commented+1, thx!
Comment #31
gawi commented+1 and ready for testing!
Comment #32
emilekott commentedsubscribe
Comment #33
ratinakage commentedsubscribe
Comment #34
Ars commented+1
Comment #35
liliplanet commentedJust found http://drupal.org/project/auto_expire which does a fabulous job :)
Comment #36
robertkein commentedsubscribe
Comment #37
Fixdit commented+1
Comment #38
cbladd commentedsubscribe
Comment #39
merakli commentedDoesn't Scheduler do the same thing on D7?
http://drupal.org/project/scheduler
Comment #40
likewhoa commented@merakli it does but without notifications like auto_expire.
Comment #41
caw67 commentedSubscribe! What about the D7 module?
Comment #42
hockey2112 commentedAny news on the Drupal 7 module?
Comment #43
CHQR.INFO commentedSubscribe
Comment #44
MackemMan commentedSubscribe - Any further news on this?
Comment #45
kaizerking commentedLooking for the D7 version of this great module
Comment #46
kaizerking commented@meatsack, have you completed the port as explained in your comment at#9?
Comment #47
MackemMan commentedI came across the following when searching for a D7 replacement for node expire....
https://github.com/meatsack/Entity-Date-Action
Just cant seem to get it working though. Any ideas as to when this will be in beta @meatsack?
Comment #48
kaizerking commented#47 the name is entity date action but the module name andother things are "node expire" in those files
and i have tried to use but iy has thrown err ReflectionException: Function "node_expire_update_lastnotify() does not exist in ReflectionFunction->__construct() (line 1691 of H:\wamp\www\xxxxxx\profiles\drop_jobs\modules\contrib\rules\includes\rules.core.inc)".
Comment #49
MackemMan commented@kaizerking - I get exactly the same error and after a lot of searching am no further on :(
Comment #50
Nafes commentedI have ported this module to Drupal 7 and it works well for me. No additional functionality has been added, just strictly the same as in Drupal 6. I am going to place the code here after some additional testing and cleaning up.
Comment #51
bennos commentedsounds nice, waiting for your work, we test it then.
Comment #52
Nafes commentedThanks bennos. I will try to finish my work soon.
Comment #53
joyaka commented+1
hope to see the results soon
Comment #54
Nafes commentedFirst version of Node expire Drupal 7 port is attached to the comment. README file contains some extra rules and also an explanation, how to create expiry dates in the past, which could be useful during web site development.
Comment #55
Nafes commentedComment #56
Nafes commentedIssues for this code are welcome to be posted here or at the project Node expire D7 port.
Comment #57
Anonymous (not verified) commentedon save content type...
Fatal error: Call to undefined function _node_expire_form_node_type_form_alter_validate() in /home/airsoft/public_html/includes/form.inc on line 1465
Comment #58
Nafes commentedThanks!
I will check it.
Comment #59
Nafes commentedSuperduperdan, somehow a file node_expire.ntype.inc, which contains function _node_expire_form_node_type_form_alter_validate() is not loaded by your installation.
Please try the following steps:
- Create new content type like "MyContentType".
- In this content type go to "Publishing options".
- Leave field "Default expiration date" blank and check a checkbox "Expiration date required."
- Try to save the content type.
You should see an error message "Default expiration date should be set with expiration date required." This error message is produced by function _node_expire_form_node_type_form_alter_validate().
Sometimes issues with including files are happening in an advanced development. See, for example
http://www.victheme.com/blog/drupal-7-form-missing-include-files and http://www.midwesternmac.com/blogs/jeff-geerling/calling-form-validate.
Please let me know if this simple test does not work and/or provide me some additional details about you particular content type.
Comment #60
Anonymous (not verified) commentedThat simple test produced the same error.
Fatal error: Call to undefined function _node_expire_form_node_type_form_alter_validate() in /home/airsoft/public_html/includes/form.inc on line 1465
Comment #61
Anonymous (not verified) commentedI just tested on a fresh Drupal install and it produces the same error when attempting to save a new Content Type.
Comment #62
Nafes commentedLet me test it on a fresh Drupal install as well.
Comment #63
Nafes commentedFresh Drupal installation on Hostgator - works. So far I can not reproduce the issue.
Somehow the function module_load_include() does not work properly. Let me investigate more. In meantime could you try to save new node type on the same fresh Drupal 6 installation - file including piece of code is similar in D6 and D7 versions.
It is also possible to fix the issue by including .inc files into files[] section of .info file, but let us try to avoid this. Usage of module_load_include() is a recommended approach.
Comment #64
Nafes commentedAlso where do you place the module - into /sites/all/modules/ or /sites/all/modules/contrib/ or to some other directory?
Comment #65
Anonymous (not verified) commentedI installed it into into /sites/all/modules/. I uninstalled and moved it to /sites/all/modules/contrib. Same result. I don't have any D6 installs to test this on. Sorry.
Comment #66
Anonymous (not verified) commentedI attempted to install on a new install of D7 again. It works. I need to figure out which module is not compatible on my other site. I will report back on my progress.
Comment #67
Anonymous (not verified) commentedI found the problem. The module that is triggering the error is Locations module. More specifically, when you enable Node Locations in that package. I am running Locations version 7.x-3.0-rc3. Can anyone please offer a solution?
Comment #68
Nafes commentedLet me install Locations module and see what is happening.
Comment #69
Nafes commentedSuperduperdan, you are right. Presence of Node Locations produces the above error. After some investigation I discovered that with Node Locations turned on Drupal still keeps track of main file node_expire.module but can lose track of secondary included files.
Try to add the following line:
module_load_include('ntype.inc', 'node_expire');
to the very bottom of the file node_expire.module. This fixes the issue for me,
Later I will find out how to place this solution to the module in a better way.
Comment #70
Anonymous (not verified) commentedThat worked for me. Thanks!
Comment #71
Nafes commentedYou are very welcome!
Comment #72
Nafes commentedFirst Drupal 7 release has been published.