Will this module be getting a port to D7?

CommentFileSizeAuthor
#54 node_expire_D7_Sandbox1.zip17.52 KBNafes

Comments

Shadlington’s picture

Title: Drupal 7 Port? » Node Expire: Drupal 7 Port?

Changed title

clashar’s picture

+1

tesmon’s picture

Subscribe!

bennos’s picture

Subscribe!

Anonymous’s picture

this would be great!

tesmon’s picture

Subscribe

eileen’s picture

+1

giorgio79’s picture

In case this module is not ported can we achieve the same with Rules for example?

jon nunan’s picture

#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.

Shadlington’s picture

Huh. That sounds really interesting meatsack.
That extra flexibility would be brilliant.

Looking forward to being able to test it out!

anavarre’s picture

Subscribe

acarpio’s picture

sub

cbrasfield’s picture

sub

giorgio79’s picture

How 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

skwashd’s picture

@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.

rogical’s picture

+1

BenK’s picture

Subscribing

itkadmin’s picture

subscribe

LandonAB’s picture

Subscribe

Vc Developer’s picture

Subscribe

sslider999’s picture

sub

mhawker’s picture

Subscribe

choy’s picture

subscribe

emilekott’s picture

subscribe

ivoryhotfingers’s picture

subscribe

snupy’s picture

subscribe

SharonD214@aol.com’s picture

subscribe

latte’s picture

+1 subscribe

wesnoel’s picture

Yeah +1

liliplanet’s picture

+1, thx!

gawi’s picture

+1 and ready for testing!

emilekott’s picture

subscribe

ratinakage’s picture

subscribe

Ars’s picture

+1

liliplanet’s picture

Just found http://drupal.org/project/auto_expire which does a fabulous job :)

robertkein’s picture

subscribe

Fixdit’s picture

+1

cbladd’s picture

subscribe

merakli’s picture

Doesn't Scheduler do the same thing on D7?
http://drupal.org/project/scheduler

likewhoa’s picture

Title: Node Expire: Drupal 7 Port? » Port Node Expire to Drupal 7
Version: 6.x-2.06 » master
Component: Code » Miscellaneous
Issue tags: +drupal 7 port

@merakli it does but without notifications like auto_expire.

caw67’s picture

Subscribe! What about the D7 module?

hockey2112’s picture

Any news on the Drupal 7 module?

CHQR.INFO’s picture

Subscribe

MackemMan’s picture

Subscribe - Any further news on this?

kaizerking’s picture

Looking for the D7 version of this great module

kaizerking’s picture

@meatsack, have you completed the port as explained in your comment at#9?

MackemMan’s picture

I 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?

kaizerking’s picture

#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)".

MackemMan’s picture

@kaizerking - I get exactly the same error and after a lot of searching am no further on :(

Nafes’s picture

I 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.

bennos’s picture

sounds nice, waiting for your work, we test it then.

Nafes’s picture

Thanks bennos. I will try to finish my work soon.

joyaka’s picture

+1
hope to see the results soon

Nafes’s picture

StatusFileSize
new17.52 KB

First 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.

Nafes’s picture

Assigned: Unassigned » Nafes
Nafes’s picture

Issues for this code are welcome to be posted here or at the project Node expire D7 port.

Anonymous’s picture

on 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

Nafes’s picture

Thanks!

I will check it.

Nafes’s picture

Superduperdan, 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.

Anonymous’s picture

That 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

Anonymous’s picture

I just tested on a fresh Drupal install and it produces the same error when attempting to save a new Content Type.

Nafes’s picture

Let me test it on a fresh Drupal install as well.

Nafes’s picture

Fresh 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.

Nafes’s picture

Also where do you place the module - into /sites/all/modules/ or /sites/all/modules/contrib/ or to some other directory?

Anonymous’s picture

I 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.

Anonymous’s picture

I 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.

Anonymous’s picture

I 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?

Nafes’s picture

Let me install Locations module and see what is happening.

Nafes’s picture

Superduperdan, 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.

Anonymous’s picture

That worked for me. Thanks!

Nafes’s picture

You are very welcome!

Nafes’s picture

Issue summary: View changes
Status: Active » Fixed

First Drupal 7 release has been published.

Status: Fixed » Closed (fixed)

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