Do you use or administer OpenEMR? Take the General Satisfaction Survey to help improve the product

Fatal error : Uncaught Error: Call to undefined method Document::get_url_web()

Situation
Describe your problem here
Get the following error when trying to retrieve a saved document
‘’’
PHP Fatal error: Uncaught Error: Call to undefined method Document::get_url_web() in C:\xampp\htdocs\openemr\sites\default\documents\smarty\main\%%1D^1D7^1D74D81D%%general_view.html.php:180\nStack trace:\n#0 C:\xampp\htdocs\openemr\vendor\smarty\smarty\libs\Smarty.class.php(1270): include()\n#1 C:\xampp\htdocs\openemr\controllers\C_Document.class.php(546): Smarty->fetch(‘C:/xampp/htdocs…’)\n#2 C:\xampp\htdocs\openemr\library\classes\Controller.class.php(137): C_Document->view_action(‘696’, ‘25443’)\n#3 C:\xampp\htdocs\openemr\controller.php(6): Controller->act(Array)\n#4 {main}\n thrown in C:\xampp\htdocs\openemr\sites\default\documents\smarty\main\%%1D^1D7^1D74D81D%%general_view.html.php on line 180, referer: https://127.0.0.1/openemr/controller.php?document&list&patient_id=696
‘’’

OpenEMR Version
I’m using OpenEMR version
Version Number: v6.0.0
Browser:

Operating System
I’m using:
Windows 10

Logs
Did you check the logs? Was there anything pertinent in them? Paste them here (surround with three backticks (```) for readability
‘’’
PHP Fatal error: Uncaught Error: Call to undefined method Document::get_url_web() in C:\xampp\htdocs\openemr\sites\default\documents\smarty\main\%%1D^1D7^1D74D81D%%general_view.html.php:180\nStack trace:\n#0 C:\xampp\htdocs\openemr\vendor\smarty\smarty\libs\Smarty.class.php(1270): include()\n#1 C:\xampp\htdocs\openemr\controllers\C_Document.class.php(546): Smarty->fetch(‘C:/xampp/htdocs…’)\n#2 C:\xampp\htdocs\openemr\library\classes\Controller.class.php(137): C_Document->view_action(‘696’, ‘25443’)\n#3 C:\xampp\htdocs\openemr\controller.php(6): Controller->act(Array)\n#4 {main}\n thrown in C:\xampp\htdocs\openemr\sites\default\documents\smarty\main\%%1D^1D7^1D74D81D%%general_view.html.php on line 180, referer: https://127.0.0.1/openemr/controller.php?document&list&patient_id=696
‘’’

Did you upgrade and copy your documents over from another install?

I have had this happen when I forgot to delete the smarty folder from sites/default/documents

Thank you Julie !!!

Yes, that was exactly the problem.

I removed the smarty folder allowing OpenEMR to recreate it and now, all is well again.

Thanks again.

Top glad I could help. If you can, it might help others if you mark my reply as a solution :wink:

1 Like