[Zope-CMF] CMFCalendar - ready for beta?

marc lindahl marc@bowery.com
Thu, 31 May 2001 19:56:33 -0400


I noticed this CMFCalendar product is in the CMF beta... no docs, so I just
tried it out.  Made a FTI type, created a FSDV skin folder, put it on the
paths (just after topic and before content)... then tried to add one (as
admin).  Got an error, seems there's a little bug in it?  (p.s. ignore the
directory name, it's running zope 2.3.2 final)



An exception occurred in a DTML method or document.

Error type: TypeError
Error value: ('not enough arguments; expected 2, got 1', <extension class
Products.CMFDefault.MetadataTool.ElementSpec at 8689028>, ())

Innermost method: /junk/bowery/event_edit_form
Namespace Stack (innermost entry at top)
ID    Type
(N/A)=A0    mapping with keys: ['document_id', 'document_title']=A0
testEv2=A0    InstanceDict=A0
REQUEST=A0    ZPublisher.HTTPRequest.HTTPRequest=A0

Source of /junk/bowery/event_edit_form with fault:
<dtml-var standard_html_header>



<STYLE>



<!--



body,td,th { font-family:arial,helvetica; font-size:10pt }



BIG {FONT-FAMILY: Arial,Helvetica; font-size: 17px;font-weight:bold}



A {FONT-FAMILY: Arial,Helvetica; font-size: 13.5px;}



SMALL {FONT-FAMILY: Arial,Helvetica; font-size: 2.75mm;}



 .bttn=20



 {=20



   BACKGROUND-COLOR: #cccccc;



   BORDER-BOTTOM: #9999cc 2px outset;



   BORDER-LEFT: #9999cc 2px outset;



   BORDER-RIGHT: #9999cc 2px outset;



   BORDER-TOP: #9999cc 2px outset



 }=20



   -->



</STYLE>



<style type=3D"text/css" >



<!--

   td.EventBackground  { background: #DDDDDD }

  =20

   td.EventHorizon  { background: #818384 }



   a.calendarlight:link { color: #FFFFFF; text-decoration: none }



   a.calendarlight:visited { color: #FFFFFF; text-decoration: none }



   a.calendarlight:active { color: #FFFFFF; text-decoration: none }



   a.calendarlight:hover { color: #dddddd; text-decoration: none }



   a.calendardark:link { color: #FFFFFF; text-decoration: none }



   a.calendardark:visited { color: #FFFFFF; text-decoration: none }



   a.calendardark:active { color: #FFFFFF; text-decoration: none }



   a.calendardark:hover { color: #dddddd; text-decoration: none }



   #nav a:link { color: blue; text-decoration: none }



   #nav a:visited { color: blue; text-decoration: none }



   #nav a:active { color: blue; text-decoration: none }



   #nav a:hover { color: #000000; text-decoration: none }



   #nav TD {PADDING-LEFT: 2px;}



-->



</style>



<FORM METHOD=3DPOST ACTION=3D"&dtml-absolute_url;/event_edit">

<center>

<table border=3D0 bordercolor=3Dbronze width=3D100% height=3D100% >

<tr><td align=3Dcenter valign=3Dtop >



<table border=3D0 bordercolor=3Dgrey width=3D100% height=3D100% cellspacing=3D0
cellpadding=3D0 >



<tr height=3D2% ><td colspan=3D5 >

<table border=3D0 cellpadding=3D0 cellspacing=3D0 >

<tr><td><image src=3D"event_info_tab.gif" height=3D26 width=3D90
border=3D0></td><td>

<img src=3D"space.gif" width=3D5 height=3D1></td>

<td></td>

<td><img src=3D"space.gif" width=3D5 height=3D1></td>

<td></td>

<td><img src=3D"space.gif" width=3D5 height=3D1></td>

<td></td>

<td><img src=3D"space.gif" width=3D5 height=3D1></td>

</tr>

</table>

</td></tr>



<tr height=3D2% ><td Class=3D"EventHorizon" width=3D15% colspan=3D4 >&nbsp;</td>

<td width=3D85% Class=3D"EventHorizon" align=3Dright nowrap >

<table border=3D0 cellpadding=3D6 cellspacing=3D0>

<tr><td align=3D"Right" nowrap>

<nobr>

<INPUT TYPE=3D"submit" VALUE=3D"Save" style=3D"font-size:9pt" >&nbsp;

<INPUT TYPE=3D"reset" VALUE=3D"Reset" style=3D"font-size:9pt" >&nbsp;

</nobr>

</td></tr>

</table>

</td></tr>



<tr height=3D1>

<td colspan=3D5 bgcolor=3D#FFFFFF ><img src=3D"space.gif" width=3D10 height=3D1
border=3D0></td>

</tr>

<tr height=3D96% ><td colspan=3D5 Class=3D"EventBackground" valign=3Dtop>

<table border=3D0 cellpadding=3D5 width=3D100% cellspacing=3D3>

<tr><td Class=3D"EventBackground">



<table border=3D0 width=3D100% >

<TR>

<th align=3Dright NOWRAP>Event Name</th>

<TD NOWRAP><INPUT TYPE=3Dtext NAME=3D"title" MAXLENGTH=3D100 size=3D35
VALUE=3D"&dtml-Title;"></TD>

<th align=3Dright NOWRAP>Contact Name</th>

<TD NOWRAP><INPUT TYPE=3Dtext NAME=3D"contact_name" MAXLENGTH=3D100 size=3D35
VALUE=3D"&dtml-contact_name;"></TD>

</TR>

<TR>

<th align=3Dright>Location</th>

<TD NOWRAP><INPUT TYPE=3Dtext NAME=3D"location" MAXLENGTH=3D100 size=3D35
VALUE=3D"&dtml-location;" ></TD>

<th align=3Dright NOWRAP>Contact Email</th>

<TD NOWRAP><INPUT TYPE=3Dtext NAME=3D"contact_email" MAXLENGTH=3D100 size=3D35
VALUE=3D"&dtml-contact_email;"></TD>

</TR>

<TR>

<th align=3Dright>Event type</th>

<TD VALIGN=3Dtop>

<dtml-let contentSubject=3DSubject

             allowedSubjects=3D"portal_metadata.listAllowedSubjects( this()
)">   <select name=3D"event_type:list" multiple>

     <dtml-in allowedSubjects>

     <dtml-let item=3Dsequence-item

               sel=3D"item in contentSubject and 'selected' or ''"

     >

      <option value=3D"&dtml-sequence-item;"

              &dtml-sel;> &dtml-sequence-item; </option>

     </dtml-let>

     </dtml-in>

    </select>

   </dtml-let> =20

</TD>

<th align=3Dright NOWRAP>Contact Phone</th>

<TD NOWRAP><INPUT TYPE=3Dtext NAME=3D"contact_phone" MAXLENGTH=3D100 size=3D35
VALUE=3D"&dtml-contact_phone;"></TD>

</TR>

<tr>

<th align=3D"right">Event URL</th>

<td colspan=3D"3"><input type=3D"text" name=3D"event_url" size=3D"55"
MAXLENGTH=3D"100" value=3D"&dtml-event_url;"></td>

</tr>



<tr><td colspan=3D4 >

<table border=3D0 width=3D100% cellpadding=3D2 cellspacing=3D3 >

<tr>

<td colspan=3D"4" >

<hr></font></td>

</tr>

<tr><th valign=3D"middle" align=3Dright>Start Date</th>

<dtml-with getEffectiveStrings mapping>

   <td>=20

        <select name=3D"effectiveYear">

        <dtml-in buildYears>

                        <option value=3D"&dtml-sequence-item;"

                         <dtml-if expr=3D"_['sequence-item'] =3D=3D
year">Selected</dtml-if>>

                        <dtml-var sequence-item></option>

                    </dtml-in>

        </select>



        <select name=3D"effectiveMo">

        <dtml-in buildMonths>

                        <option value=3D"&dtml-sequence-item;"

                         <dtml-if expr=3D"_['sequence-item'] =3D=3D
month">Selected</dtml-if>>

                        <dtml-var sequence-item></option>

                    </dtml-in>

        </select>

       =20

        <select name=3D"effectiveDay">

                    <dtml-in buildDays>

                        <option value=3D"&dtml-sequence-item;"

                         <dtml-if expr=3D"_['sequence-item'] =3D=3D
day">Selected</dtml-if>>

                        <dtml-var sequence-item></option>

                    </dtml-in>

               </select>

              </td>

   </dtml-with>



   <th valign=3D"middle" align=3D"right"> Stop Date </th>

   <dtml-with getExpirationStrings mapping>

   <td>=20

        <select name=3D"expirationYear">

        <dtml-in buildYears>

                        <option value=3D"&dtml-sequence-item;"

                         <dtml-if expr=3D"_['sequence-item'] =3D=3D
year">Selected</dtml-if>>

                        <dtml-var sequence-item></option>

                    </dtml-in>

        </select>



        <select name=3D"expirationMo">

        <dtml-in buildMonths>

                        <option value=3D"&dtml-sequence-item;"

                         <dtml-if expr=3D"_['sequence-item'] =3D=3D
month">Selected</dtml-if>>

                        <dtml-var sequence-item></option>

                    </dtml-in>

        </select>

       =20

        <select name=3D"expirationDay">

                    <dtml-in buildDays>

                        <option value=3D"&dtml-sequence-item;"

                         <dtml-if expr=3D"_['sequence-item'] =3D=3D
day">Selected</dtml-if>>

                        <dtml-var sequence-item></option>

                    </dtml-in>

               </select>

              </td>



   </td>

   </dtml-with>

</td>

</tr>



<TR>

<th valign=3D"middle" align=3D"right">Start Time</th>

<TD><select name=3D"start_time" >

<dtml-let stTimeString=3D"_.string.split(getStartTimeString())"

            amSel=3D"(_.len(stTimeString) =3D=3D 2 and stTimeString[1] =3D=3D 'am')
and 'CHECKED' or ''"

            pmSel=3D"(_.len(stTimeString) =3D=3D 2 and stTimeString[1] =3D=3D 'pm')
and 'CHECKED' or ''"

        >

        <dtml-in buildTimes>

        <option value=3D"&dtml-sequence-item;"

          <dtml-if expr=3D"_['sequence-item'] =3D=3D stTimeString[0]">

             selected=3D"selected"

          </dtml-if>> <dtml-var sequence-item> </option>

        </dtml-in>

       </select>

       <input type=3D"radio" name=3D"startAMPM" value=3D"am" &dtml-amSel;> am

       <input type=3D"radio" name=3D"startAMPM" value=3D"pm" &dtml-pmSel;> pm

       <input type=3D"hidden" name=3D"startAMPM:default" value=3D"pm">

      </dtml-let>

</TD>

<th valign=3D"middle" align=3D"right">Stop Time</th>

   <td> <select name=3D"stop_time">

        <dtml-let stTimeString=3D"_.string.split(getStopTimeString())"

            amSel=3D"(_.len(stTimeString) =3D=3D 2 and stTimeString[1] =3D=3D 'am')
and 'CHECKED' or ''"

            pmSel=3D"(_.len(stTimeString) =3D=3D 2 and stTimeString[1] =3D=3D 'pm')
and 'CHECKED' or ''"

        >

        <dtml-in buildTimes>

        <option value=3D"&dtml-sequence-item;"

          <dtml-if expr=3D"_['sequence-item'] =3D=3D stTimeString[0]">

             selected=3D"selected"

          </dtml-if>> <dtml-var sequence-item> </option>



        </dtml-in>



       </select>

       <input type=3D"radio" name=3D"stopAMPM" value=3D"am" &dtml-amSel;> am

       <input type=3D"radio" name=3D"stopAMPM" value=3D"pm" &dtml-pmSel;> pm

       <input type=3D"hidden" name=3D"stopAMPM:default" value=3D"pm">

   </dtml-let>

   </td>

</tr>

</table>

</td></tr>



<tr><td colspan=3D4 ><hr></td></tr>

<tr>

<th align=3Dright valign=3Dtop >Description</th>

<TD colspan=3D"3" VALIGN=3Dtop NOWRAP>

<TEXTAREA NAME=3D"description" WRAP=3Dvirtual ROWS=3D6
COLS=3D55>&dtml-Description;</TEXTAREA>

</td></tr>



</table>

</td></tr>



</table>

</td></tr>

</table>

</td></tr>

</table>

    </center>

</FORM>

<dtml-var standard_html_footer>


Call stack (security context)
/junk/bowery/event_edit_form

REQUEST information
form

cookies
tree-s    'eJzTiFZ3hANPW3UdhWiEiHuVr616bGysjiYAwPAJ8Q'
portal_skin    'underground'
dtpref_cols    '50'
__ac    'YWRtaW46c2hhcmsqMi43%0a'
dtpref_rows    '15'

other
AUTHENTICATION_PATH    ''
BASEPATH1    ''
dtpref_rows    '15'
PUBLISHED    <FSDTMLMethod instance at 8f6be08>
portal_skin    'underground'
__ac    'YWRtaW46c2hhcmsqMi43%0a'
batch_size    20
SERVER_URL    'http://210.67.3.12'
tree-s    'eJzTiFZ3hANPW3UdhWiEiHuVr616bGysjiYAwPAJ8Q'
URL    'http://210.67.3.12/junk/bowery/Admin/testEv2/event_edit_form'
AUTHENTICATED_USER    admin
TraversalRequestNameStack    []
dtpref_cols    '50'
URL0    http://210.67.3.12/junk/bowery/Admin/testEv2/event_edit_form
URL1    http://210.67.3.12/junk/bowery/Admin/testEv2
URL2    http://210.67.3.12/junk/bowery/Admin
URL3    http://210.67.3.12/junk/bowery
URL4    http://210.67.3.12/junk
URL5    http://210.67.3.12
BASE0    http://210.67.3.12
BASE1    http://210.67.3.12
BASE2    http://210.67.3.12/junk
BASE3    http://210.67.3.12/junk/bowery
BASE4    http://210.67.3.12/junk/bowery/Admin
BASE5    http://210.67.3.12/junk/bowery/Admin/testEv2
BASE6    http://210.67.3.12/junk/bowery/Admin/testEv2/event_edit_form

environ
SCRIPT_NAME
HTTP_HOST    210.67.3.12
channel.creation_time    991352480
HTTP_REFERER    http://210.67.3.12/junk/bowery/Admin/invokeFactory
HTTP_UA_CPU    PPC
HTTP_EXTENSION    Security/Remote-Passphrase
SERVER_PROTOCOL    1.1
SERVER_PORT    8080
PATH_TRANSLATED    /junk/bowery/Admin/testEv2/event_edit_form
HTTP_ACCEPT    */*
REQUEST_METHOD    GET
SERVER_SOFTWARE    Zope/Zope 2.3.2 (binary release, python 1.5.2,
linux2-x86) ZServer/1.1b1
HTTP_COOKIE    portal_skin=3Dunderground; dtpref_rows=3D15; dtpref_cols=3D50;
__ac=3DYWRtaW46c2hhcmsqMi43%0a;
tree-s=3DeJzTiFZ3hANPW3UdhWiEiHuVr616bGysjiYAwPAJ8Q
HTTP_UA_OS    MacOS
PATH_INFO    /junk/bowery/Admin/testEv2/event_edit_form
HTTP_ACCEPT_LANGUAGE    en, ja;q=3D0.7, zh-hk;q=3D0.3
GATEWAY_INTERFACE    CGI/1.1
SERVER_NAME    localhost
REMOTE_ADDR    127.0.0.1
HTTP_USER_AGENT    Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
CONNECTION_TYPE    Keep-Alive


Traceback (innermost last):
  File /usr/local/zope/Zope-2.3.1/lib/python/ZPublisher/Publish.py, line
223, in publish_module
  File /usr/local/zope/Zope-2.3.1/lib/python/ZPublisher/Publish.py, line
187, in publish
  File /usr/local/zope/Zope-2.3.1/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
    (Object: DynamicType)
  File /usr/local/zope/Zope-2.3.1/lib/python/ZPublisher/Publish.py, line
171, in publish
  File /usr/local/zope/Zope-2.3.1/lib/python/ZPublisher/mapply.py, line 160=
,
in mapply
    (Object: event_edit_form)
  File /usr/local/zope/Zope-2.3.1/lib/python/ZPublisher/Publish.py, line
112, in call_object
    (Object: event_edit_form)
  File=20
/usr/local/zope/Zope-2.3.1/lib/python/Products/CMFCore/FSDTMLMethod.py, lin=
e
180, in __call__
    (Object: event_edit_form)
  File /usr/local/zope/Zope-2.3.1/lib/python/DocumentTemplate/DT_String.py,
line 538, in __call__
    (Object: event_edit_form)
  File /usr/local/zope/Zope-2.3.1/lib/python/Products/ZDebug/DTMLDebug.py,
line 307, in debug_render_blocks
  File /usr/local/zope/Zope-2.3.1/lib/python/Products/ZDebug/DTMLDebug.py,
line 239, in debugException
    (Object: contentSubject=3DSubject

             allowedSubjects=3D"portal_metadata.listAllowedSubjects( this()
)")
  File /usr/local/zope/Zope-2.3.1/lib/python/Products/ZDebug/DTMLDebug.py,
line 305, in debug_render_blocks
  File /usr/local/zope/Zope-2.3.1/lib/python/DocumentTemplate/DT_Let.py,
line 146, in render
    (Object: contentSubject=3DSubject

             allowedSubjects=3D"portal_metadata.listAllowedSubjects( this()
)")
  File /usr/local/zope/Zope-2.3.1/lib/python/DocumentTemplate/DT_Util.py,
line 334, in eval
    (Object: portal_metadata.listAllowedSubjects( this() ))
    (Info: this)
  File <string>, line 0, in ?
  File=20
/usr/local/zope/Zope-2.3.1/lib/python/Products/CMFDefault/MetadataTool.py,
line 511, in listAllowedSubjects
    (Object: portal_metadata)
  File=20
/usr/local/zope/Zope-2.3.1/lib/python/Products/CMFDefault/MetadataTool.py,
line 501, in _listAllowedVocabulary
    (Object: portal_metadata)
  File=20
/usr/local/zope/Zope-2.3.1/lib/python/Products/CMFDefault/MetadataTool.py,
line 440, in getElementSpec
    (Object: portal_metadata)
  File /usr/local/zope/Zope-2.3.1/lib/python/ZODB/PersistentMapping.py, lin=
e
114, in __getitem__
  File /usr/local/zope/Zope-2.3.1/lib/python/ZODB/Connection.py, line 533,
in setstate
TypeError: (see above)