Hi,
I'm a little bit puzzled by the fact that everytime I save one specific template (default one) , it triggers the execution of one specific UDT.
This UDT does only one thing : error_log (some values from $POST and user IP)....
If I tail the file written by error_log ($mymessage,3,$mypath) I can clearly see that every time I "save" the template it executes the UDT....
Furthermore, ,this UDT is otherwise called within a global content inside an ajax page and every time I call that ajax pag the UDT code gets executed twice...
I'd be very grateful if someone could point me to my mistake or anything that could help.
Thank you very much for any thought or hint.
CMSMS version 1.11.4
ANOMALY : UDT runs after Template save
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: ANOMALY : UDT runs after Template save
UDT's are smarty plugins.... if they are included in a page template (even via a GCB) then they are called.
That includes when editing templates, and editing content.
That includes when editing templates, and editing content.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: ANOMALY : UDT runs after Template save
I understand now....
And I'm going to sort out the double execution...unless you can help me without knowing my code
Edited : because it is two different issues and I don't want to make anybody angry...
And I'm going to sort out the double execution...unless you can help me without knowing my code

Edited : because it is two different issues and I don't want to make anybody angry...
Re: ANOMALY : UDT runs after Template save
Here is some fun info....
I used Postman Chrome extension and I built a page with only UDT call.
UDT simple logic is : delay( 1s), error_log( time())
Template of page is : {process_pagedata}{content}
Page content is : {UDT}
If I post
Url : /page
I get one write in file
If I post
Url : /page?showtemplate=false
I get two writes in log file with 1s different unix timestamp
So I have some questions:
Can anybody reproduce with 1.11.4? (thanks for your patience...)
How can I set the content header to 'application/json' if I return some json info?
I believe showtemplate=false is NOT necessary if my template doesn't return any nice layout, am I wrong?
Thank you x3
I used Postman Chrome extension and I built a page with only UDT call.
UDT simple logic is : delay( 1s), error_log( time())
Template of page is : {process_pagedata}{content}
Page content is : {UDT}
If I post
Url : /page
I get one write in file
If I post
Url : /page?showtemplate=false
I get two writes in log file with 1s different unix timestamp
So I have some questions:
Can anybody reproduce with 1.11.4? (thanks for your patience...)
How can I set the content header to 'application/json' if I return some json info?
I believe showtemplate=false is NOT necessary if my template doesn't return any nice layout, am I wrong?
Thank you x3
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: ANOMALY : UDT runs after Template save
The running twice issue is a bug that has been solved in the upcoming version 1.11.5.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
[SOLVED] : UDT runs after Template save
YES!
I had a feeling it was odd...and thanks for the fix.
Is cmsms()->set_variable('content-type', 'application/json'); a good idea to set the content to json?
I had a feeling it was odd...and thanks for the fix.
Is cmsms()->set_variable('content-type', 'application/json'); a good idea to set the content to json?