Announcement

Collapse
No announcement yet.

Alternative Error Message To "The Following Global Variables are Missing"

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Alternative Error Message To "The Following Global Variables are Missing"

    Under some cases, global variables will be missing after a customer has logged out (ex: he opens 2 windows), or under a variety of other circumstances, such as bookmarking a URL and going back to it later without any of the previous globals set.

    How can I create a custom page or text for when this happens? At the very least, I'd like a custom header.

    Thanks!

  • #2
    If global variables are missing you have simply an error in your application which needs to be solved. I always advise to allocate the globals on a central spot, i.e. the logon page. Then you will never run into issues like these.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Agreed, but what if someone has 2 windows open and logs out from a different page? Or bookmarks an internal page?
      Your solution is good, but won't cover those cases. As silly as it is, you can image novice users bookmarking a page and then going back to it, seeing the error, and panicking.

      Comment


      • #4
        You can consider to use a small piece of code in the onscriptinit to sc_redir to the main page if you main global is not allocated or has the wrong value.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment

        Working...
        X