#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    40
    Rep Power
    11

    Passing values through an error.cfm


    I have put in an error page and am trying to avoid forcing the user to log back in after receiving an error, they should be able to simply return to the home page. To do this I need to pass the user_id.

    Anyone have any ideas on how this can be accomplished?
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,265
    Rep Power
    968
    umm, maybe I'm missing something, but why not just do a cflocation at the bottom of your error template that redirects the user back to the home page, appending the appropriate url variables as necessary?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    40
    Rep Power
    11
    Well ... maybe there is a different way than we are doing.

    Right now application.cfm directs you to error.cfm like this:

    <cferror template="error.cfm" type="request" exception="Error.Template">

    The above statement does not accept appended values on the URL so once the user is on the error.cfm page there are no remaining values to append for passing. Passing FROM the error page will be easy once I can pass them TO the error page in the first place.
  6. #4
  7. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,265
    Rep Power
    968
    Would using the cferror data key "queryString" work for you? This should be a string holding whatever was in the user's query string at the time of the error. You could append that to the cflocation in your error handling template.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    40
    Rep Power
    11
    That would be fine ... If I could pass the user_id TO the error handling template from application.cfm.

    I iether need a different way to send the user to the error page, or I need a way to pass the userid in the following:

    <cferror template="error.cfm" type="request" exception="Error.Template">
  10. #6
  11. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,265
    Rep Power
    968
    How are you keeping up with the userID right now? If it in the query string, it will be available as part of the querystring key of the cferror structure. If you're using session variables, those variables should still be available on the error page for you to use.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    40
    Rep Power
    11
    The way the logout is structured #session.danum# is not available on that page for some reason. I didn't write that part of the code. My partner on the project had to implement a secutrity measure because loggin back in with a different ID was still using the first ID access. It may be possible we need an alternate solution for access security. If we can't find a way to pass the variable we'll have to look at that.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    40
    Rep Power
    11
    went a different route ... put a JS back button to move back 2 pages to before they entered teh error.

IMN logo majestic logo threadwatch logo seochat tools logo