|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
durangod Smarty Regular
Joined: 10 Feb 2011 Posts: 39
|
Posted: Sun Jul 24, 2016 4:49 pm Post subject: using smarty with ajax and avoiding smarty system messages |
|
|
Hi,
I am doing a software plugin and they use smarty. I am doing some ajax requests which means that i do not need the index html files for those ajax php files, there would be no need for them.
However i keep getting messages in my error report that smarty is unable to open the smarty index html file for that name..
example i have ajaxgetmessages.php
but i do not have ajaxgetmessages_index.html because i dont need it.
How do i avoid that messages, i have seen some developers just put the html files in place and make them blank, but that sort of seems like a hack rather than procedure.
Is that the only way to avoid the messages or is there another method built into smarty to tell it that "its ok no need to look for those file names"
Maybe an exception capture or request of some kind.
Thanks
The message is: Unable to load template file |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sun Jul 24, 2016 9:23 pm Post subject: |
|
|
It seems the site engine is horribly coded.
It forcibly prepends some code to each PHP file, which is not bad per se, but that code initializes Smarty… Which IS bad.
Such code must be as generic and agnostic as possible. |
|
Back to top |
|
durangod Smarty Regular
Joined: 10 Feb 2011 Posts: 39
|
Posted: Sun Jul 24, 2016 10:05 pm Post subject: |
|
|
hi, im not really sure what that means regarding my issue.
Is there an exception on the smarty side i can use ? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Mon Jul 25, 2016 12:17 am Post subject: |
|
|
YOU can use nothing, talk to the programmer that maintain the server code base, tell him to sort the server stuff to not throw exceptions around.
This is not Smarty issue in the slightest, it is the brain malfunction of whoever coded the website you are dealing with. |
|
Back to top |
|
durangod Smarty Regular
Joined: 10 Feb 2011 Posts: 39
|
Posted: Mon Jul 25, 2016 3:28 am Post subject: |
|
|
ok thanks i will just add the empty html files to solve it...
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|