RedTurtle / collective.signupsheet

A Plone solution for manage signup attendance to events
http://plone.org/products/collective.signupsheet
1 stars 5 forks source link

action adapter "Registrants" not deselectable #8

Closed staeff closed 10 years ago

staeff commented 10 years ago

Hello,

I tried to deselect the action adapter "Registrants" on the edit page of a signupsheet. Saving the edit form led to the following error message:

  - URL: file:/home/codio/workspace/zinstance/src/collective.signupsheet/collective/signupsheet/skins/collective_signupsheet/ss_base_view_p3.cpt
   - Line 108, Column 16
   - Expression: <PythonExpr not view.getSignupStatus() =='full'>
   - Names:
      {'container': <PloneSite at /Plone>,
       'context': <SignupSheet at /Plone/fomular>,
       'default': <object object at 0x7f4f1be044e0>,
       'here': <SignupSheet at /Plone/fomular>,
       'loop': {},
       'nothing': None,
       'options': {'args': (),
                   'state': <Products.CMFFormController.ControllerState.ControllerState object at 0x7f4efca40d50>},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7f4efca4da48>,
       'request': <HTTPRequest, URL=http://clarion-evita.codio.io:8080/Plone/fomular/ss_base_view_p3>,
       'root': <Application at >,
       'template': <FSControllerPageTemplate at /Plone/ss_base_view_p3 used for /Plone/fomular>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>}
  Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
   - __traceback_info__: not view.getSignupStatus() =='full'
  Module PythonExpr, line 1, in <expression>
  Module collective.signupsheet.browsers.signupsheet_baseview, line 26, in getSignupStatus
AttributeError: 'list' object has no attribute 'contentIds'
keul commented 10 years ago

Although unselecting that adapter is a strange configuration, the error is totally bad. I'll look into this

staeff commented 10 years ago

I know it seems a bit strange. My idea was on the one hand to understand the features of the product better by trying all possible configuration options. On the other hand i was looking to make everything a bit simpler by using the simple DataSaveAdapter of PloneFormGen. But know I am very convinced by the possibilities that come with the Registrants Adapter.

keul commented 10 years ago

Got it.

Keep in mind that for simply using the SaveDataAdapter you don't need signupsheet, but simply PloneFormGen.

keul commented 10 years ago

Someway fixed by @federicadelia in https://github.com/RedTurtle/collective.signupsheet/commit/5e0ee7dd30e6dafd9e216ce731bbf13a68911524