Issue for patient document view when Fax and SMS module are enable into system

Hi All,

Patient document will be not display and unknow screen display for patient document when user click on the any document when fax is enabled. And below are the error log will going to show on apach2 error log
[Tue Aug 27 08:13:27.016814 2024] [php:error] [pid 102] [client 10.0.1.113:6570] PHP Fatal error: Uncaught TypeError: oe_module_faxsms_document_render_javascript_fax_dialog(): Argument #1 ($event) must be of type Symfony\Component\EventDispatcher\Event, Symfony\Component\EventDispatcher\GenericEvent given, called in /var/www/localhost/htdocs/openemr/vendor/symfony/event-dispatcher/EventDispatcher.php on line 230 and defined in /var/www/localhost/htdocs/openemr/interface/modules/custom_modules/oe-module-faxsms/openemr.bootstrap.php:121\nStack trace:\n#0 /var/www/localhost/htdocs/openemr/vendor/symfony/event-dispatcher/EventDispatcher.php(230): oe_module_faxsms_document_render_javascript_fax_dialog()\n#1 /var/www/localhost/htdocs/openemr/vendor/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher->callListeners()\n#2 /var/www/localhost/htdocs/openemr/library/smarty/plugins/function.dispatchPatientDocumentEvent.php(49): Symfony\Component\EventDispatcher\EventDispatcher->dispatch()\n#3 /var/www/localhost/htdocs/openemr/sites/default/documents/smarty/main/583cb4849bfe36bdd79dc24d3160be898c8d237e_0.file.general_view.html.php(30): smarty_function_dispatchPatientDocumentEvent()\n#4 /var/www/localhost/htdocs/openemr/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_66cd887776fb11_70968502()\n#5 /var/www/localhost/htdocs/openemr/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#6 /var/www/localhost/htdocs/openemr/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render()\n#7 /var/www/localhost/htdocs/openemr/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render()\n#8 /var/www/localhost/htdocs/openemr/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute()\n#9 /var/www/localhost/htdocs/openemr/controllers/C_Document.class.php(574): Smarty_Internal_TemplateBase->fetch()\n#10 /var/www/localhost/htdocs/openemr/library/classes/Controller.class.php(157): C_Document->view_action()\n#11 /var/www/localhost/htdocs/openemr/controller.php(6): Controller->act()\n#12 {main}\n thrown in /var/www/localhost/htdocs/openemr/interface/modules/custom_modules/oe-module-faxsms/openemr.bootstrap.php on line 121, referer: https://testing/interface/main/tabs/main.php?token_main=P38vwQPS4otBwJURr3jIaYBsttrjkbK19OgHT8rW

[Tue Aug 27 08:25:57.646436 2024] [php:error] [pid 321] [client 10.0.1.113:27956] PHP Fatal error: Uncaught TypeError: oe_module_faxsms_document_render_action_anchors(): Argument #1 ($event) must be of type Symfony\Component\EventDispatcher\Event, Symfony\Component\EventDispatcher\GenericEvent given, called in /var/www/localhost/htdocs/openemr/vendor/symfony/event-dispatcher/EventDispatcher.php on line 230 and defined in /var/www/localhost/htdocs/openemr/interface/modules/custom_modules/oe-module-faxsms/openemr.bootstrap.php:115\nStack trace:\n#0 /var/www/localhost/htdocs/openemr/vendor/symfony/event-dispatcher/EventDispatcher.php(230): oe_module_faxsms_document_render_action_anchors()\n#1 /var/www/localhost/htdocs/openemr/vendor/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher->callListeners()\n#2 /var/www/localhost/htdocs/openemr/library/smarty/plugins/function.dispatchPatientDocumentEvent.php(51): Symfony\Component\EventDispatcher\EventDispatcher->dispatch()\n#3 /var/www/localhost/htdocs/openemr/sites/default/documents/smarty/main/583cb4849bfe36bdd79dc24d3160be898c8d237e_0.file.general_view.html.php(145): smarty_function_dispatchPatientDocumentEvent()\n#4 /var/www/localhost/htdocs/openemr/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_66cd887776fb11_70968502()\n#5 /var/www/localhost/htdocs/openemr/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#6 /var/www/localhost/htdocs/openemr/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render()\n#7 /var/www/localhost/htdocs/openemr/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render()\n#8 /var/www/localhost/htdocs/openemr/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute()\n#9 /var/www/localhost/htdocs/openemr/controllers/C_Document.class.php(574): Smarty_Internal_TemplateBase->fetch()\n#10 /var/www/localhost/htdocs/openemr/library/classes/Controller.class.php(157): C_Document->view_action()\n#11 /var/www/localhost/htdocs/openemr/controller.php(6): Controller->act()\n#12 {main}\n thrown in /var/www/localhost/htdocs/openemr/interface/modules/custom_modules/oe-module-faxsms/openemr.bootstrap.php on line 115, referer: https://testing/interface/main/tabs/main.php?token_main=P38vwQPS4otBwJURr3jIaYBsttrjkbK19OgHT8rW

For above I have fixed the ** interface/modules/custom_modules/oe-module-faxsms/openemr.bootstrap.php** file for fax module. Wrong input parameter is passed below two functions function oe_module_faxsms_document_render_action_anchors(Event $event) and function oe_module_faxsms_document_render_javascript_fax_dialog(Event $event) and fixed GenericEvent $event to the parameter and issue is fixed.

@stephenwaite Please let me know if this fix is need for community I can created PR for this Fix.

Thanks,
NIlesh

thanks for the report @Nilesh_Hake , good thing to do is to check on the dev demos that are running the latest code and see if you can reproduce. You can also use the easy dev docker to check on your local system after you’ve synced your master branch.

2 Likes

Ok I will check @stephenwaite