senaite/senaite.health

exceptions cannot add any new patients to senaite.health

khzhu opened this issue · 2 comments

khzhu commented

Steps to reproduce

  1. log into senaite.health as an admin user
  2. click on Patient link on the left panel menu
  3. click on "Add Patient" button
  4. add some required patient information
  5. click on "Save" button

Current behavior

exceptions are thrown (see attached)

Expected behavior

a new patient add to ZODB

Screenshot (optional)

Screen Shot 2020-02-18 at 2 38 05 PM

khzhu commented

here is what logged. BWT, I am using docker version of senaite.health.

2020-02-18T19:52:01 ERROR Zope.SiteErrorLog 1582055521.620.815591787978 http://localhost:8083/senaite/clients/client-1/portal_factory/Patient/patient.2020-02-18.5012657026/base_edit
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.CMFPlone.FactoryTool, line 478, in __call__
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.CMFFormController.FSControllerPageTemplate, line 91, in __call__
  Module Products.CMFFormController.BaseControllerPageTemplate, line 29, in _call
  Module Products.CMFFormController.ControllerBase, line 232, in getNext
  Module Products.CMFFormController.Actions.TraverseTo, line 38, in __call__
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.CMFFormController.FSControllerPythonScript, line 105, in __call__
  Module Products.CMFFormController.Script, line 145, in __call__
  Module Products.CMFCore.FSPythonScript, line 127, in __call__
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 344, in _exec
  Module script, line 1, in content_edit
   - <FSControllerPythonScript at /senaite/clients/client-1/portal_factory/Patient/patient.2020-02-18.5012657026/content_edit>
   - Line 1
  Module Products.CMFCore.FSPythonScript, line 127, in __call__
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 344, in _exec
  Module script, line 8, in content_edit_impl
   - <FSPythonScript at /senaite/clients/client-1/portal_factory/Patient/patient.2020-02-18.5012657026/content_edit_impl>
   - Line 8
  Module Products.CMFPlone.FactoryTool, line 321, in doCreate
  Module Products.ATContentTypes.lib.constraintypes, line 277, in invokeFactory
  Module Products.CMFCore.PortalFolder, line 290, in invokeFactory
ValueError: Disallowed subobject type: Patient
xispa commented

@khzhu this has been fixed in the code base already and will be available in next release: #168

Please follow these instructions meanwhile: #167 (comment)