collective.contentrules.comingsoon

Warning
This product has not had a release in over 1 year and may no longer be maintained.
by Thomas Desvenain last modified Apr 28, 2011 09:53 AM

A rule type which is handled when an event, or any content having a start date, will begin tomorrow, or within any delay.

Project Description

Introduction

This module adds a new rule type to Plone content rules system which is handled when a Plone event, or any content having a start date, will begin tomorrow, or within any delay.

First, add collective.contentrules.comingsoon package to the 'eggs' parameter of your buildout, or in the dependencies of your policy product, and restart your buildout.

Then you have to create a cron that calls once a day '@@comingsoon-notify' view on site root, using a wget for example. (http://localhost:port/my/site/@@cominsoon-notify).

You may use z3c.recipe.usercrontab recipe that manages cron tasks from buildout: http://pypi.python.org/pypi/z3c.recipe.usercrontab/

Then, you can add 'Coming soon' rules to your content rules. Those rules will be handled on each event content whose start date is among a defined delay.

The notification delay can be set on 'Coming soon' configuration page. The default delay is one day.

Changelog

1.0.2 (2011-04-28)

  • Add buildout & bootstrap. [toutpt]
  • Add dependency of plone.app.registry in default profile and upgrade step. [toutpt]

1.0.1 (2011-04-27)

  • Avoid ComponentLookupError with Plone 4.0. [thomasdesvenain]

1.0 (2011-04-06)

  • Initial release. [thomasdesvenain]

Current Release
collective.contentrules.comingsoon 1.0.2

Released Apr 28, 2011 — tested with Plone 4

Easier to install under Plone 4.0
More about this release…

Download file Get collective.contentrules.comingsoon for all platforms
collective.contentrules.comingsoon-1.0.2.zip
If you are using Plone 3.2 or higher, you probably want to install this product with buildout. See our tutorial on installing add-on products with buildout for more information.

All Releases

Version Released Description Compatibility Licenses Status
1.0.2 Apr 28, 2011 Easier to install under Plone 4.0 More about this release…
Plone 4
GPL final
1.0.1 Apr 27, 2011 - Avoid ComponentLookupError with Plone 4.0. [thomasdesvenain] More about this release…
Plone 4
GPL final
1.0 Apr 06, 2011 Initial release More about this release…
Plone 4
GPL final

Comments (12)

Charles Witt Apr 27, 2011 10:40 AM
When I go to @@comingsoon-settings url at root of my website I get:
"""
Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 47, in call_object
  Module plone.z3cform.layout, line 64, in __call__
  Module plone.z3cform.layout, line 54, in update
  Module plone.z3cform.fieldsets.extensible, line 59, in update
  Module z3c.form.group, line 125, in update
  Module z3c.form.form, line 129, in updateWidgets
  Module plone.app.registry.browser.controlpanel, line 45, in getContent
  Module zope.component._api, line 171, in getUtility
ComponentLookupError: (<InterfaceClass plone.registry.interfaces.IRegistry>, '')
"""

When I go to @@comingsoon-notify url at root of my website I get:
"""
Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 47, in call_object
  Module collective.contentrules.comingsoon.notify, line 25, in notify
  Module zope.component._api, line 171, in getUtility
ComponentLookupError: (<InterfaceClass plone.registry.interfaces.IRegistry>, '')
"""
Thomas Desvenain Apr 27, 2011 10:46 AM
plone.app.registry dependency is needed. i forgot to import it in configure.zcml
Thomas Desvenain Apr 27, 2011 10:57 AM
try the 1.0.1 i just released
Charles Witt Apr 27, 2011 11:27 AM
same errors
except one line disappeared from the @@comingsoon-settings results
"""Module plone.z3cform.patch, line 30, in GroupForm_update""" is now gone

Here is results of bin\buildout.exe after first running bin\buildout.exe -n
"""
C:\Program Files\Plone>bin\buildout.exe
Updating productdistros.
Updating instance.
Updating zopepy.
Updating zopeskel.
Updating backup.
Updating controller.
Updating unifiedinstaller.
*************** PICKED VERSIONS ****************
[versions]
collective.ckeditor = 3.4.1
collective.contentrules.comingsoon = 1.0.1
collective.contentrules.mailtogroup = 1.2
collective.z3cform.datetimewidget = 1.0.4
plomino = 1.9.6
plone.autoform = 1.0b6
plone.registry = 1.0b5
plone.supermodel = 1.0b8
products.pythonfield = 1.1.3
products.talesfield = 1.1.3
products.templatefields = 1.2.5
products.windowz = 1.3-beta

#Required by:
#plomino 1.9.6
collective.js.jqueryui = 1.8.12.2

#Required by:
#collective.ckeditor 3.4.1
collective.plonefinder = 1.0.1

#Required by:
#collective.plonefinder 1.0.1
#collective.ckeditor 3.4.1
collective.quickupload = 1.1.0

#Required by:
#plomino 1.9.6
dm.sharedresource = 1.0

#Required by:
#collective.contentrules.comingsoon 1.0.1
plone.app.registry = 1.0b6

#Required by:
#plone.app.registry 1.0b6
plone.app.z3cform = 0.5.3

#Required by:
#plone.autoform 1.0b6
plone.z3cform = 0.7.3

#Required by:
#plone.z3cform 0.7.3
z3c.batching = 1.1.0

#Required by:
#z3c.formwidget.query 0.5
#plone.z3cform 0.7.3
#collective.z3cform.datetimewidget 1.0.4
z3c.form = 2.4.2

#Required by:
#plone.app.z3cform 0.5.3
z3c.formwidget.query = 0.5

*************** /PICKED VERSIONS ***************
"""
Thomas Desvenain Apr 27, 2011 12:07 PM
you may have to install plone.app.registry (Configuration Registry) module on your plone site (via portal_quickinstaller for example)
Charles Witt Apr 27, 2011 03:35 PM
The plone.app.registry (Configuration Registry) does not show up in portal_quickinstaller.

I even switched to a brand new 4.0.5 installation on a different test server with no extras installed except contentrules.comingsoon.

Anybody out there who has this running on Windows? If so, please let us know if you experienced similar issues and how you got through it.

I did have to add "zope.schema = 3.6.0" because of
"""
Error: There is a version conflict.
We already have: zope.schema 3.5.4
but z3c.form 2.4.2 requires 'zope.schema>=3.6.0'.
"""
Thomas Desvenain Apr 27, 2011 03:48 PM
So i'm afraid you have an issue with your plone.app.registry installation...
Charles Witt Apr 27, 2011 05:28 PM
Ok, maybe I made some progress.
I put "plone.app.registry" in both the eggs and zcml sections. Ran bin\buildout -n. Now "Configuration registry 1.0b6 A Mozilla about:config style configuration registry"
and
"Plone z3c.form support 0.5.3 Adds support for rendering z3c.form forms in Plone"
both show up in portal_quickinstaller. I installed both of them.
Now "@@comingsoon-settings" url generates
"""
Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 47, in call_object
  Module plone.z3cform.layout, line 64, in __call__
  Module plone.z3cform.layout, line 54, in update
  Module plone.z3cform.fieldsets.extensible, line 59, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 125, in update
  Module z3c.form.form, line 129, in updateWidgets
  Module plone.app.registry.browser.controlpanel, line 45, in getContent
  Module plone.registry.registry, line 74, in forInterface
KeyError: 'Interface `collective.contentrules.comingsoon.interfaces.IComingSoonSettings` defines a field `delay`, for which there is no record.'
"""
"@@comingsoon-notify" url generates same KeyError.
Thomas Desvenain Apr 27, 2011 05:30 PM
i just created a tracker. can you use it to report bugs please ?
Charles Witt Apr 28, 2011 10:14 AM
1.0.2 appears to have resolved this on my test instance. I no longer get errors when going to "@@comingsoon-settings" and "@@comingsoon-notify" urls. I am going to try it in production now. Thank you thomasdesvenain and toutpt. I will report further issues in the tracker.
Charles Witt Apr 28, 2011 04:04 PM
This is probably not a bug. How do I wget the "@@comingsoon-notify" url? It keeps redirecting to the "acl_users/credentials_cookie_auth/require_login" url. I tried wget's --user and --password parameter without success. Alternatively, can I change the permission for the the "@@comingsoon-notify" url to allow anonymous wget retrieval?
Charles Witt Apr 29, 2011 01:55 PM
Got it working with (replace parts as appropriate):
wget --auth-no-challenge --http-user=ExampleUser --http-password=ExamplePassword http://ExampleIIS:ExamplePort/ExamplePlone/example.html

However, I do have a related issue that I will put in the issue tracker.