Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

using smarty with ajax and avoiding smarty system messages

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
durangod
Smarty Regular


Joined: 10 Feb 2011
Posts: 39

PostPosted: Sun Jul 24, 2016 4:49 pm    Post subject: using smarty with ajax and avoiding smarty system messages Reply with quote

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 Wink

The message is: Unable to load template file
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sun Jul 24, 2016 9:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
durangod
Smarty Regular


Joined: 10 Feb 2011
Posts: 39

PostPosted: Sun Jul 24, 2016 10:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Mon Jul 25, 2016 12:17 am    Post subject: Reply with quote

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
View user's profile Send private message
durangod
Smarty Regular


Joined: 10 Feb 2011
Posts: 39

PostPosted: Mon Jul 25, 2016 3:28 am    Post subject: Reply with quote

ok thanks i will just add the empty html files to solve it...

Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP