Native Patient Portal 2 - SyntaxError and more

Have several issues when I want to use the native online portal vs 2.
I have followed the steps mentioned in https://www.open-emr.org/wiki/index.php/Patient_Portal.

After setting up, the following occurs (or not):

  • The following error appears “Modal Template Fetch:SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data”.
    Note: this appears when selecting “Portal dashboard” in the menu/tree. See print screen below
  • There is no email sent with the credentials to the patient, the print function works fine.

Need help to figure out what is going on and to solve the issues.

thx.

Print screen:
print screen - dashboard - error message.pdf (217.8 KB)

Hi @rickzimm,
Sorry but i’ve tried using Dutch language for this template fetch in both patch3 and prepatch 4 and works okay. Still, I don’t think my translations are up to date.
This script portal/sign/assets/signer_modal.tpl.php is the template for signing modal. Either it is failing security or throwing a PHP error.
Check your PHP error log and look at browser console for error while loading portal page.
Also are you able to log in to a patient portal and use the signer?

1 Like

Jerry thank you for figuring it out!

The error occurred because of restrictions in my .htaccess file, namely the restriction for tpl(.php) files. The presented error (403: forbidden) was pointing to the file portal/sign/assets/signer_modal.tpl.php.

Situation
In my situation Openemr is installed in the directory of my website, the site is build in Drupal. Drupal is very secure platform and there are (extra) restrictions in the .htaccess.
And good to know, my provider’s server uses as OS: CentOS Linux (Core), it’s a virtual server that runs on: cloudstack. Note: server control with .htaccess.

Solution
The portal/sign/assets/signer_modal.tpl.php was renamed and emptied, renamed in signer_modal.php
So the renaming did the trick!

Jerry will add this solution to the next patch that is coming up!

1 Like