Using z3c.form 2.4.1 in S&D
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Singing & Dancing |
High
|
Daniel Widerin |
Bug Description
I tried to run S&D with latest version of z3c.form with Plone 4.
Zope raises ConfigurationCo
Toni Mueller (support-oeko-net) wrote : | #1 |
Toni Mueller (support-oeko-net) wrote : | #2 |
Quick fix for Plone4 only: Delete the two offending registrations in collective.
ToniMueller (support-oeko) wrote : | #3 |
Using zcml.condition requires z3c.form to provide the appropriate features. The following patch does this:
--- configure.zcml.orig 2010-10-21 15:24:05.000000000 +0200
+++ configure.zcml 2010-10-21 15:40:58.000000000 +0200
@@ -1,6 +1,7 @@
<configure
xmlns="http://
xmlns:i18n="http://
+ xmlns:meta="http://
i18n_
<!-- default z3c.form layer -->
@@ -9,6 +10,8 @@
/>
+ <meta:provides feature=
+ <meta:provides feature=
<!-- Validators -->
<adapter
After that, one can ask for these features in the configure.zcml of collective.singing. Because I'm lazy, I only checked for one feature, and put both widgets into one zcml file:
$ cat oldz3cform.zcml
<z3c:
mode="hidden"
widget=
layer=
template=
/>
<z3c:
mode="hidden"
widget=
layer=
template=
/>
$ diff -uw configure.zcml.orig configure.zcml
--- configure.zcml.orig 2010-10-21 15:35:14.000000000 +0200
+++ configure.zcml 2010-10-21 15:34:16.000000000 +0200
@@ -1,24 +1,14 @@
<zope:configure
xmlns:zope="http://
xmlns:z3c="http://
+ xmlns:zcml="http://
xmlns="http://
-</zope:configure>
- <z3c:widgetTemplate
- mode="hidden"
- widget=
- layer="
- template=
- />
-
- <z3c:widgetTemplate
- mode="hidden"
- widget=
- layer="
- template=
- />
+ <include file="oldz3cfor
+ zcml:condition=
<zope:adapter
factory=
/>
+</zope:configure>
$
With these changes, I can now fire up a Plone 4 server with collective.dancing 0.9 installed. I've not checked with older versions, though.
Daniel Nouri (daniel.nouri) wrote : | #4 |
I'd say we just drop support for older versions of z3c.form. Can we find out which version introduced the widgets in question, and just require that as a minimum version in setup.py? Still might want to leave oldz3cform.zcml around for people who like to tinker.
Daniel Widerin (saily) wrote : | #5 |
I'll modify the collective.
Changed in singing-dancing: | |
importance: | Undecided → High |
assignee: | nobody → Daniel Widerin (saily) |
status: | New → Confirmed |
status: | Confirmed → In Progress |
Changed in singing-dancing: | |
status: | In Progress → Fix Committed |
status: | Fix Committed → Fix Released |
I'm also running into this problem, but fortunately, I only need Plone4 compatibility at this point.