Now i got that :

  • Module Products.PageTemplates.TALES, line 221, in evaluate
    URL: file:CPSDirectory/skins/cps_directory/cpsdirectory_entry_edit_form.pt
    Line 25, Column 2
    _expression_: <PythonExpr dir.renderEditEntryDetailed(id, request=edit_request)>
    Names:
    {'container': <CPSDefaultSite at /cps>,
    'context': <CPSDefaultSite at /cps>,
    'default': <Products.PageTemplates.TALES.Default instance at 0x014C7CD8>,
    'here': <CPSDefaultSite at /cps>,
    'loop': <Products.PageTemplates.TALES.SafeMapping object at 0x05E3AF30>,
    'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x014BC288>,
    'nothing': None,
    'options': {'args': ()},
    'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0x05E3AF30>,
    'request': <HTTPRequest, URL="" href="http://albator/cps/cpsdirectory_entry_edit_form">http://albator/cps/cpsdirectory_entry_edit_form >,
    'root': <Application at >,
    'template': <FSPageTemplate at /cps/cpsdirectory_entry_edit_form>}
  • 
    
  • Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
    __traceback_info__: dir.renderEditEntryDetailed(id, request=edit_request)
  • Module Python _expression_ "dir.renderEditEntryDetailed(id, request=edit_request)", line 1, in <_expression_>
  • Module Products.CPSDirectory.BaseDirectory, line 611, in renderEditEntryDetailed
  • Module Products.CPSSchemas.Layout, line 344, in validateLayoutStructure
  • Module Products.PatchPhotoInMemberData.PatchAddPhotoToLDAPMembers, line 216, in validate
  • Module Products.CPSSchemas.BasicWidgets, line 1904, in makeFile
  • Module Products.CPSSchemas.BasicWidgets, line 1887, in getResizedImage
UnboundLocalError: local variable 'outfile' referenced before assignment




On 5/5/06, lopez adrian <[EMAIL PROTECTED]> wrote:

Ok i will attempt your solution.
i take you aware



On 5/5/06, Fabrice Robin <[EMAIL PROTECTED] > wrote:
It doesn't seem to be related to the patch as none of its methods are called in the traceback.

I don't understand why you have to add ldap fields to member_cps_fields backing but
I am not a specialist at all. I believed the member_cps_fields directory was only used to store member datas (in ZODB)
which are not existing in LDAP directories. In my setup, I only have "python:{'homeless': False, 'last_login_time': None}" for this backing.

This is how I added a photo field to members profiles:
In members directory, members_stack backing, I added "jpegPhoto -> photo" in Field renaming

In members_ldap schema, I added a CPS Image Field named "jpegPhoto" (and all the ldap fields I needed).
In members schema, I added a CPS Image Field named "photo".

In members layout, I added a Photo Widget named "photo" with fields=photo.

That's all I needed to be able to show/modify photos for ldap members.

Regards,
Fabrice


2006/5/5, lopez adrian < [EMAIL PROTECTED] >:

Thanks for the patch.


How i install it :
i just put the folder in my products folder of my CPS instance and i reboot CPS.

Result:
Ok now i dont have any error when i access to the member data in view mode now.
But there is an other problem.

I use LDAP membership in Read only mode.
I have to add the field in the backings info "Entry used if missing (TALES):" so i put

   python:{'homeless': True, 'last_login_time':None,'test':None,'adresse':None,'telperso':None,
'telpersoportable':None,'emailperso':None,'client':None,'adresseclient':None,'contactclient':None,
'mailclient':None,'titre':None,
'photo':None}

photo is my field CPS Image Field in the schema of my backing directory members_cps_fields.
I had my image widget in the layout of members.

Now when i access the member data in view mode i had no problem the photo widget is empty (normal because i put 'photo':None).

but when i go in edit mode, and when i want to add a photo, when i save my changes i got this error:









Traceback:

Traceback (innermost last):

  • URL: /cps/cpsskins_main_template_default

    Line 42, Column 16


    _expression_: <PythonExpr isRenderable and
    content.render_cache

    (shield=shield, context_obj=context_obj, enable_esi=enable_esi, boxedit=boxedit, template=template, options=options)>


    Names:
    {'container': <CPSDefaultSite at /cps>,
    'context': <CPSDefaultSite at /cps>,


    'default': <Products.PageTemplates.TALES.Default instance at 0x014C7CD8>,
    'here': <CPSDefaultSite at /cps>,


    'loop': <Products.PageTemplates.TALES.SafeMapping object at 0x048A7E90>,
    'modules': <

    Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x014BC288>,
    'nothing': None,


    'options': {'args': ()},
    'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0x048A7E90>,


    'request': <HTTPRequest, URL="" href="http://albator/cps/cpsdirectory_entry_edit_form" target="_blank" >
    http://albator/cps/cpsdirectory_entry_edit_form
    >,
    'root': <Application at >,
    'template': <FSPageTemplate at /cps/cpsdirectory_entry_edit_form>,

    'traverse_subpath': [],
    'user': <User 'seternal'>}


  • Module
    Products.PageTemplates.ZRPythonExpr
    , line 47, in __call__

    __traceback_info__: isRenderable and content.render_cache(shield=shield, context_obj=context_obj, enable_esi=enable_esi, boxedit=boxedit, template=template, options=options)





  • Module Python _expression_ "isRenderable and content.render_cache(shield=shield, context_obj=context_obj, enable_esi=enable_esi, boxedit=boxedit, template=template, options=options)", line 1, in <_expression_>




  • Module Products.CPSSkins.PortalBoxGroup, line 313, in render_cache


  • Module Products.CPSSkins.PortalBoxGroup, line 258, in render


  • Module Products.CPSPortlets.CPSPortlet



    , line 487, in render_cache


  • Module Products.CPSDocument.CPSDocument, line 68, in render


  • Module Products.CPSDocument.FlexibleTypeInformation, line 752, in renderObject





  • Module
    Products.CPSDocument.FlexibleTypeInformation, line 714, in _renderLayouts


  • Module Products.CPSSchemas.Layout, line 391, in renderLayoutStructure


  • Module Products.CPSSchemas.BasicWidgets


    , line 2045, in render


  • Module Products.CPSPortlets.PortletWidgets.MainContentWidget, line 27, in renderMainContent


  • Module Products.CMFCore.FSPageTemplate , line 134, in pt_render




  • Module Products.PageTemplates.PageTemplate
    , line 104, in pt_render

    <FSPageTemplate at /cps/cpsdirectory_entry_edit_form>


  • Module TAL.TALInterpreter, line 238, in __call__




  • Module TAL.TALInterpreter, line 281, in interpret


  • Module TAL.TALInterpreter, line 749, in do_useMacro


  • Module TAL.TALInterpreter, line 281, in interpret





  • Module TAL.TALInterpreter, line 457, in do_optTag_tal



  • Module TAL.TALInterpreter, line 442, in do_optTag


  • Module TAL.TALInterpreter, line 437, in no_tag



  • Module

    TAL.TALInterpreter, line 281, in interpret


  • Module TAL.TALInterpreter
    , line 772, in do_defineSlot


  • Module TAL.TALInterpreter, line 281, in interpret



  • Module TAL.TALInterpreter

    , line 507, in do_setLocal_tal


  • Module Products.PageTemplates.TALES
    , line 221, in evaluate

    URL: file:CPSDirectory/skins/cps_directory/cpsdirectory_entry_edit_form.pt


    Line 25, Column 2



    _expression_: <PythonExpr dir.renderEditEntryDetailed(id, request=edit_request)>


    Names:
    {'container': <CPSDefaultSite at /cps>,
    

    'context': <CPSDefaultSite at /cps>,


    'default': <Products.PageTemplates.TALES.Default instance at 0x014C7CD8>,
    'here': <CPSDefaultSite at /cps>,

    'loop': <Products.PageTemplates.TALES.SafeMapping
    object at 0x048451E8>,

    'modules': <
    Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x014BC288>,
    'nothing': None,
    'options': {'args': ()},

    'repeat': <Products.PageTemplates.TALES.SafeMapping
    object at 0x048451E8>,


    'request': <HTTPRequest, URL="" href="http://albator/cps/cpsdirectory_entry_edit_form" target="_blank" >http://albator/cps/cpsdirectory_entry_edit_form



    >,
    'root': <Application at >,
    'template': <FSPageTemplate at /cps/cpsdirectory_entry_edit_form>}


  • Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__


    __traceback_info__:


    dir.renderEditEntryDetailed(id, request=edit_request)


  • Module Python _expression_ "dir.renderEditEntryDetailed(id, request=edit_request)", line 1, in <_expression_>


  • Module

    Products.CPSDirectory.BaseDirectory
    , line 617, in renderEditEntryDetailed


  • Module Products.CPSSchemas.DataModel, line 334, in _commit


  • Module Products.CPSSchemas.DataModel
    , line 360, in _commitData



  • Module
    Products.CPSSchemas.StorageAdapter, line 146, in setData


  • Module Products.CPSDirectory.MetaDirectory, line 692, in _setData



  • Module Products.CPSDirectory.ZODBDirectory

    , line 191, in _createEntry


  • Module Products.CPSDirectory.ZODBDirectory, line 198, in _editEntry


  • Module Products.CPSDirectory.BaseDirectory
    , line 513, in _editEntry



  • Module
    Products.CPSSchemas.DataModel
    , line 334, in _commit


  • Module Products.CPSSchemas.DataModel, line 360, in _commitData


  • Module
    Products.CPSSchemas.StorageAdapter, line 146, in setData



  • Module Products.CPSSchemas.StorageAdapter
    , line 181, in _setData


  • Module Products.CPSSchemas.StorageAdapter, line 260, in _setFieldData


AttributeError: _setObject


form

widget__homelessTrue
widget__adresseclient'None'
widget__cpsGroups ['SI']
widget__telperso''
widget__contactclient'None'
widget__photo_filename ''
widget__telpersoportable''
widget__photo_choice'change'
widget__cpsRoles ['Member']
cpsdirectory_entry_edit_form'Enregistrer'
widget__photo<ZPublisher.HTTPRequest.FileUpload instance at 0x0483E878>
widget__client'None'
widget__adresse'None'
widget__emailperso'None'
dirname'members'
widget__mailclient'None'
id'alopezrufian'
widget__titre'None'

cookies

__ac'YWxvcGV6cnVmaWFuOmF6MTIzMTIz'
__cp'x%DA%D3%60b%60%60%C8%04b%86hF%20%A1%C1%0C%24J%40%DCb%10%2B%B9%A0%B8%84%03Dg%14%E5%E7%E5%EB%A6%01%00g%F7%06%E3'
_ZopeId'82555391A2U1SMjpvrs'

lazy items

SESSION<bound method SessionDataManager.getSessionData of <SessionDataManager at /session_data_manager>>




other

URL0' http://albator/cps/cpsdirectory_entry_edit_form '
cpsdirectory_entry_edit_form'Enregistrer'
_ec_cache{94641840: <Products.PageTemplates.TALES.Context instance at 0x041DC968>}
PATH_INFO'/cps/cpsdirectory_entry_edit_form'
URL2'http://albator '
AcceptCharset <Products.Localizer.Accept.AcceptCharset instance at 0x04EDB8A0>
dirname'members'
id'alopezrufian'
_oai_cache{94641840: <Products.CMFCore.ActionInformation.oai instance at 0x04B6D8C8>}



































































Is there a problem with the default value of my Image widget? Or is there a bug with the patch?



_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to