Reputation: 227
I want to use collective.autopublish to set outdated Plone pages to private. The goal is to set Plone pages to private after the expiration date automatically. (similar to the problem described here)
I installed collective.autopublish and I can configure it in the web interface. It should use the collective.timedevents extension to get triggered. So I added that as well and tried to install it using the readme file. It told me to add a zope clock-server triggering the events, which i did according to the code snippet on the page.
[instance]
...
zope-conf-additional =
<clock-server>
method /mysite/@@tick
period 90
user clockserver-user
password password
host localhost
</clock-server>
I changed mysite
to my Plone URL.
The clock-server seems to work, as I got HTTP calls for the /mysite/@@tick page every 90 seconds, resulting in 404 errors, but nothing is triggered from collective.timedevents. Did I miss something or get something wrong from the documentation? Should this work?
Btw: I registered the handler from collective.autopublish for the ITickEvent.
Upvotes: 3
Views: 85
Reputation: 116
It's not normal that you get a 404 error when calling /mysite/@@tick
. You should get a 200 code.
In fact, I had the problem myself and this is due to an error in the last releases of the package : a file (configure.zcml
) is missing, preventing the "tick" view to work.
See the issue here : https://github.com/collective/collective.timedevents/issues/3
If you use collective.autopublishing
0.3, it is working. The package is broken since release 1.0.
Upvotes: 0
Reputation: 6839
I'm unable to answer your question directly but I can provide a much more simpler solution for your problem.
As I see, what you want to achieve is, that expired content is no longer visible for the public.
Check this small addon https://github.com/4teamwork/ftw.protectinactive ftw.protectinactive
.
It automatically protects expired, or inactive content.
You in your case you may automatically set a expiration date on the content and it will be hidden to the public as soon as it reaches the date.
Upvotes: 3