Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Q] Options for Auto Unpublish & Purge Expired Content #2863

Closed
Dinornis opened this issue Sep 24, 2017 · 12 comments
Closed

[Q] Options for Auto Unpublish & Purge Expired Content #2863

Dinornis opened this issue Sep 24, 2017 · 12 comments

Comments

@Dinornis
Copy link

Dinornis commented Sep 24, 2017

Does anyone have any recommendations for configuring Backdrop to automatically unpublish and purge content that has been set to expire?

Our volunteer-run website (currently on D6) provides a notice board for the local community where people can post various notices similar to how classifieds work.
At the moment this functionality is made possible thanks to the Auto Expire module (D6 only,) which allows us to set expiration time for 30 days for a content type and users are allowed to renew the content for one or more cycles. Before a node is expired a warning message is sent to the user who can then extend the node for another 30 days.

The nodes are unpublished on the first cron run after the expiry date and nodes that have expired for a certain amount of time can be automatically purged.

Although we could upgrade to Drupal 7 and with a combination of modules maintain this ability, we would much rather find a way to switch to Backdrop while being able to retain this functionality.

Simmilar D7 Modules:

Any suggestions are very much appreciated.

Edit: added D6 notes.

@docwilmot
Copy link
Contributor

You could do this with Rules, but why not just port the auto expire module? Perhaps I'm reading your issue wrong.

@laryn
Copy link
Contributor

laryn commented Sep 24, 2017

Scheduler is in process of being ported. If that module would suffice, feel free to help me get to a formal release:

https://github.com/laryn/scheduler/

@Dinornis
Copy link
Author

Dinornis commented Sep 24, 2017

You could do this with Rules, but why not just port the auto expire module? Perhaps I'm reading your issue wrong.

Scheduler is in process of being ported. If that module would suffice, feel free to help me get to a formal release:

https://github.com/laryn/scheduler/

Thanks for the suggestions. Unfortunately, I am not a coder, so my ability to help with porting any modules is quite limited.

Also, I forgot to mention that Auto Expire is available only for D6.

@laryn
Copy link
Contributor

laryn commented Sep 25, 2017

@Dinornis The upgrade path isn't ready yet but if you're willing to install the current version and do some testing on it it would be great.

@Dinornis
Copy link
Author

I will see if I can be of any use... 😄

@Dinornis
Copy link
Author

Hi @laryn, I did some testing, added few issues to your list, but really hit a roadblock at backdrop-contrib/scheduler#12 where I can't even save a node while using the Scheduler due to a conflict between various date formats.

@laryn
Copy link
Contributor

laryn commented Sep 26, 2017

Thanks, @Dinornis! I'll try to take a look soon.

@Dinornis
Copy link
Author

@docwilmot said:

You could do this with Rules, but why not just port the auto expire module? Perhaps I'm reading your issue wrong.

I am also looking at the Rules module, but fail to see how I would go about setting this up. Have you used Rules for something simmilar and have any hints/suggestions that would help me getting started?

@docwilmot
Copy link
Contributor

Youll need to enable Rules and Rules scheduler. And see this article for steps: https://groups.drupal.org/node/240678
I would think the steps for your case would be something like this;

  1. Set up a flag or field on the node type which shows that it has not expired
  2. Rule 1 triggers whenever a node is created or that flag is clicked; it evaluates after 25 days to send email
  3. Rule 2 triggers when Rule 1 executes. This Rule 2 deletes the node in 5 days if its flag is expired.

Something like that?

@Dinornis
Copy link
Author

Thank you @docwilmot although definitely not intuitive interface it looks like one can do a lot with rules. At the moment it does not seem to be ready for production, will try to help testing and identifying issues at https://github.com/backdrop-contrib/rules/issues

@docwilmot
Copy link
Contributor

Sorry about the errors. We've done a lot of work with Rules and EMW while porting Ubercart and I'm pretty sure it's stable now, since Ubercart uses quite a bunch of Rules to work well (and we've got all tests passing on Ubercart now). But unfortunately we haven't pushed a new release of Rules nor EMW yet. @Graham-72 is on vacation I believe, so when he's available we can tackle this. (We probably should check Rules tests as well)

@quicksketch
Copy link
Member

Closing this question out. Please reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants