plone: can't edit admin user in personalize_form if remember is installed


As soon as remember is installed I can't edit the admin user settings in personalize_form anymore. Why is this?

I wrote an email on this problem:


Now I think, I have an idea.

  1. personalize_form calls Products/PlonePAS/tools/memberdata.py(243)canWriteProperty()
  2. which leads to Products.PlonePAS-3.12-py2.4.egg/Products/PlonePAS/tools/memberdata.py(226)_memberdataHasProperty()
  3. which does 'if mdata'
  4. bool(mdata) results in 'False'
  5. Stepping into it lands us in Products/BTreeFolder2/BTreeFolder2.py(511)__getattr__(), with name being '__nonzero__'. What kind of name is that?
  6. http://docs.python.org/release/2.4/ref/customization.html informs us that bool tries to call  __nonzero__(), then __len__() and after that assumes True
  7. So, because remembers portal_memberdata is a BTree, which has __len__, but is empty by default, this doesn't work.
  8. Let Products.remember.tools.memberdata.MemberDataContainer have a __nonzero__.
  9. Works like a charm!
  10. But is this the right place - shoudn't rather Products/PlonePAS/tools/memberdata.py(226)_memberdataHasProperty() do a 'if mdata != None'?