# Fatal error : Uncaught Error: Call to undefined method Document::get\_url\_web()

**URL:** <https://community.open-emr.org/t/fatal-error-uncaught-error-call-to-undefined-method-document-get-url-web/15948>\
**Category:** Support\
**Created:** [January 31, 2021, 2:42am UTC](https://community.open-emr.org/t/fatal-error-uncaught-error-call-to-undefined-method-document-get-url-web/15948 "2021-01-31T02:42:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DONMNELL](https://community.open-emr.org/user_avatar/community.open-emr.org/donmnell/32/15394_2.png) [@DONMNELL](https://community.open-emr.org/u/DONMNELL)\
**Post date:** [January 31, 2021, 2:42am UTC](https://community.open-emr.org/t/fatal-error-uncaught-error-call-to-undefined-method-document-get-url-web/15948/1 "2021-01-31T02:42:46Z")

</div>

**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](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](https://127.0.0.1/openemr/controller.php?document&list&patient_id=696)  
‘’’

---

<div class="post-metadata">

**Author:** ![Julie\_b](https://community.open-emr.org/user_avatar/community.open-emr.org/julie_b/32/13325_2.png) [@Julie\_b](https://community.open-emr.org/u/Julie_b)\
**Post date:** [February 2, 2021, 8:14am UTC](https://community.open-emr.org/t/fatal-error-uncaught-error-call-to-undefined-method-document-get-url-web/15948/2 "2021-02-02T08:14:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DONMNELL](https://community.open-emr.org/user_avatar/community.open-emr.org/donmnell/32/15394_2.png) [@DONMNELL](https://community.open-emr.org/u/DONMNELL)\
**Post date:** [February 3, 2021, 6:00am UTC](https://community.open-emr.org/t/fatal-error-uncaught-error-call-to-undefined-method-document-get-url-web/15948/3 "2021-02-03T06:00:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Julie\_b](https://community.open-emr.org/user_avatar/community.open-emr.org/julie_b/32/13325_2.png) [@Julie\_b](https://community.open-emr.org/u/Julie_b)\
**Post date:** [February 3, 2021, 12:55pm UTC](https://community.open-emr.org/t/fatal-error-uncaught-error-call-to-undefined-method-document-get-url-web/15948/4 "2021-02-03T12:55:53Z")

</div>

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