WebGUI
      Click here to register.
      
PBWG Banner


     Report a Bug > WebGUI Bug Tracker

AssetProxy() does not have access to form parameters

User knowmad
Date 7/30/2007 2:24 pm
Severity Cosmetic (misspelling, formatting problems)
Version WebGUI 7.3.14
Views 144
Rating 0    Rate [
|
]
Karma Rank 0.000000
Previous · Next
User Message
knowmad
We are using an AssetProxy on an SQL Report which accesses the FormParam() macro to get form values passed in to the container asset. In Admin On mode, this works fine. However, when we go to normal view, the AssetProxy cannot read the form parameters and we get back empty values. This behavior is inconsistent.

Back to Top
Rate [
|
]
 
 
Graham

Can you clarify how you are using the FormParam macro?

If you are using it inside the SQL query, that is a very bad idea, and you should use placeholders instead. 



Back to Top
Rate [
|
]
 
 
knowmad

Graham,

I agree that using it inside of the SQL is bad. I was just having that discussion today with another user. We are using it in the Description as a way to re-populate a search form. It works fine with Admin On but stops working when in normal mode -- logged in or not.



Back to Top
Rate [
|
]
 
 
Graham
I'm not able to duplicate this.  Could you reproduce the problem on a demo site and post the URL?

Back to Top
Rate [
|
]
 
 
knowmad

Graham,

I have setup a demo site with a snippet that has a FormParam macro which gets included into the Home Page via an AssetProxy. Unfortunately the FormParam is disabled by default on demo sites so this test does not work. Could you enable the macro and test the following url:

 http://demo.plainblack.com/demo1185971415_787/home&t=1 

Perhaps this issue has been resolved in more recent releases if you are unable to duplicate it.

 

Thanks,
William

----
Knowmad Technologies
http://www.knowmad.com



Back to Top
Rate [
|
]
 
 
Graham

I was able to reproduce this.  It's because of the caching code used by the snippet.  The output of the snippet is cached, depending on the time set in the Display tab.  This caching is purposely turned off in admin mode.

Was the initial problem also related to the use of snippets?



Back to Top
Rate [
|
]
 
 
knowmad

I was able to reproduce this.  It's because of the caching code used by the snippet.  The output of the snippet is cached, depending on the time set in the Display tab.  This caching is purposely turned off in admin mode.

Was the initial problem also related to the use of snippets?

I'm glad you were able to duplicate. Yes, it was a snippet that was being included by the AsssetProxy. I believe that we tried to clear the Cache but that did not help the problem.

 

William 

----
Knowmad Technologies
http://www.knowmad.com



Back to Top
Rate [
|
]
 
 
Graham

You should be able to set the cache time on the snippet to 0.  That made it work correctly for me.



Back to Top
Rate [
|
]