Templates for Patient Documents: Site ID is missing from session data!

Because the code was already in the download_template.php document, I deleted the ob_clean and flush code. Result: fetching the documents via patient=>documents works partly. Opening the document in Word and letting Word reparing the document gives the result … strange!!

try this
download_template.php (14.1 KB)

That did the trick, fetching the document and open in openoffice works!!

What was the issue?

You added
error_reporting(error_reporting() & ~E_NOTICE);
ini_set(‘display_errors’, 1);
mb_internal_encoding(“UTF-8”);

AND deleted: Flush

correct?

This was debug stuff and multibyte may be issue but doubt it. I did add character set to header content type: header(“Content-Type: $mimetype; charset=utf-8”); and set cache control to private:
header(“Cache-control: private”); Also, ended the output buffer instead of
ob_clean();
flush();
So here is a source for release. Took out debugging and multibyte. If this file works then your good to go.

download_template.php (14.0 KB)

I implemented download_template.php and it works!!!

Thank you very much for all your work and patience.
What do I owe you?

hi @sjpadgett and @Ralf_Lukner , The session/cookie fix will be in the first 5.0.2 patch (guessing it will go out in a couple weeks). Here is the fix if you need it earlier: cookie/session fix and a path fix (#2615) · openemr/openemr@22f3c7c · GitHub
(just the code in the login.php script)

1 Like

You owe me nothing. I know how hard these types of issues can be for folks. In this case we had a perfect storm of symptoms.

Now, if you wanted to make a small donation to OpenEMR to help defray the cost of this forum then, who am I to tell you how to spend your money. :slight_smile:

Until next time.

I will do, thanks …

Thanks. I’ve already have on my server. Seems to be working back to way it use to work. Still testing though.