Quantcast

knop_user login and search params put into array

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

knop_user login and search params put into array

mail

knop is doing something strange with form params and I am wondering if there is a fix. If I enter a value, submit the page, then there is an an error, the page returns back to the same page and the value is set to the previous value. However, Knop has merged the search params and the result is an array and that gets placed into the form element. Here is the debug trace from knop_user login:

login: Authenticating user
username: Client_Log_In_Name array: (clinician2)
searchparams: array: (pair: (-op)=(eq)), (pair: (Client_Log_In_Name)=(array: (clinician2)))
login: Searching user db, 0 found No error SELECT SQL_CALC_FOUND_ROWS * FROM dataarc_mobile.client WHERE (`Client_Log_In_Name` = 'array: (clinician2)') LIMIT 0,50
login: Invalid login (1 attempts)
logout: Logged out

Michael

-- 

#############################################################

This message is sent to you because you are subscribed to

the mailing list <[hidden email]>.

To unsubscribe, E-mail to: <[hidden email]>

Send administrative queries to  <[hidden email]>

List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html

Project homepage http://montania.se/projects/knop/

Google Code has the latest downloads at http://code.google.com/p/knop/


	
	
	
	
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: knop_user login and search params put into array

stevepiercy
It sounds like the action file (or possibly the library on an
override) is loading fields from the database, not the form.  On
errors, you want to load from the form.

     -> loadfields
     Overwrites all field values with values from either
database, action_params
     or explicit -params. Auto-detects based on current lasso_currentaction.

In addition on errors, you probably want to remain on the same
page.  That's what this does at the end of an action file (from
the Knop demo act_advanced_edit.inc):

     if: (!($f -> isvalid) || $f -> error_code)
         && ($f -> getbutton == 'add' || $f -> getbutton == 'save');
         // remain on the same path to show form again
         $nav -> (setlocation: ($nav -> actionpath));
         // show error message
         $message -> (insert: ($f -> error_msg) + ' ' + ($f -> error_code));
     /if;

--steve


On 6/2/11 at 9:02 PM, [hidden email] pronounced:

>[ This message was sent as HTML. The text you see here was    ]
>[ generated by Mailsmith; the original HTML is available as   ]
>[ an enclosure.                                               ]
>
>
>knop is doing something strange with form params and I am
>wondering if there is a fix. If I enter a value, submit the
>page, then there is an an error, the page returns back to the
>same page and the value is set to the previous value. However,
>Knop has merged the search params and the result is an array
>and that gets placed into the form element. Here is the debug
>trace from knop_user login:
>
>login: Authenticating user
>username: Client_Log_In_Name array: (clinician2)
>searchparams: array: (pair: (-op)=(eq)), (pair:
>(Client_Log_In_Name)=(array: (clinician2)))
>login: Searching user db, 0 found No error SELECT
>SQL_CALC_FOUND_ROWS * FROM dataarc_mobile.client
><http://dataarc_mobile.client> WHERE (`Client_Log_In_Name` =
>'array: (clinician2)') LIMIT 0,50
>login: Invalid login (1 attempts)
>logout: Logged out
>
>Michael
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Loading...