Re: problem using ErrorMessages.db to redirect requests

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59927
interpreted = N
texte = Yes, Globals is where I usually put the include file (something like ^error/templatenotfound.incl). Especially if you have multiple hosts on the server. On my main server, which has dozens of hosts, I have a main error include in globals that looks for a host-specific error include file (something like /error/templatenotfound.incl) in the host being accessed, which is responsible for any custom handling for that host. If no host-specific include exists, then the global include does it's default behavior. - brian On Nov 7, 2004, at 2:56 PM, eLists wrote: > Hi Brian, > > Brian Fries wrote: >> I much prefer to keep complex code like this in an include file, so >> the errormessages.db would have a much simpler entry like this: >> TemplateNotFound [include (your include file)] > > That makes a lot of sense :) Do you put that include file in the > globals? > >> This way you can modify the include file without having to mess with >> the errormessages.db, which makes debugging and site changes easier. >> I see a missing "]" in the "[showif [numfound=0]" near the end... > > Not surprising :) Thanks, it helps to have another set of eyes looking > - I will check that out. > >> Did you restart WebDNA after modifying the errormessages.db? This may >> be necessary to ensure that WebDNA sees the changes. > > Sure did. I spent a bit of time looking in the archives and found a > few other suggestions on how other folks deal with stuff in regards to > the ErrorMessages.db as well. > >> - brian > > Thanks for your time. > > drt > >> On Nov 7, 2004, at 12:22 PM, eLists wrote: >>> Hello, >>> >>> I have a site I just moved from 4.51 to 6.0 on linux. I am using the >>> errors db to redirect requests styled a certain way, unfortunately >>> it does not seem to work on the 6.0 install. >>> >>> The 'normal' link would be styled as: >>> http://www.bear.net/bears/details.html?record_id=10198944095185228 >>> >>> The 'easy' links I am promoting, which would re-direct to the above >>> would be: >>> >>> http://www.bear.net/profiles/Sandrobear/ >>> >>> The below entry in the ErrorMssages.db is what was working on the >>> 4.5 install, but does not work on 6.0. >>> >>> I am guessing that maybe I Was just lucky that it worked on the 4.51 >>> and the way I wrote it apparently breaks something on 6.0 - any >>> suggestions? >>> >>> I basically look for a request in the /profiles/ directory (which >>> does in fact exist on the server) the do a search on the last part >>> - the username - in the database and then do a re-direct to the >>> original long URL. If it were to stay at the shorter URL that would >>> also be fine. The problem is accessing a link with the name vs. the >>> record ID no longer works. >>> >>> >>> --- ErrorMessages.db record --- >>> TemplateNotFound [hideif [thisurl]^/profiles]Error: template >>> '[param1]' not found[/hideif][showif [thisurl]^/profiles][ListWords >>> Words=[thisurl]&Delimiters=/][showif [index]=2][text >>> show=f]nick=[word][/text][/showif][/ListWords][search >>> db=/databases/bears.db&eqWebNickDatarq=[url][nick][/ >>> url]&eqprocessDatarq=1][numfound][hideif >>> [numfound]=0][founditems][REDIRECT >>> url=http://www.bear.net/bears/details.html? >>> record_id=[record_id]][record_id]>> bgcolor="#FFFFFF">

>> href="http://www.bear.net/bears/details.html? >>> record_id=[record_id]][record_id]">If not redirected click >>> here[/founditems][/hideif][/search][/ >>> showif][showif [numfound=0][REDIRECT >>> url=http://www.bear.net/profiles/?request=[thisurl]][/showif] >>> >>> >> -- Brian Fries, BrainScan Software -- >> http://www.brainscansoftware.com -- ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: problem using ErrorMessages.db to redirect requests ( Brian Fries 2004)
  2. Re: problem using ErrorMessages.db to redirect requests ( eLists 2004)
  3. Re: problem using ErrorMessages.db to redirect requests ( Brian Fries 2004)
  4. problem using ErrorMessages.db to redirect requests ( eLists 2004)
Yes, Globals is where I usually put the include file (something like ^error/templatenotfound.incl). Especially if you have multiple hosts on the server. On my main server, which has dozens of hosts, I have a main error include in globals that looks for a host-specific error include file (something like /error/templatenotfound.incl) in the host being accessed, which is responsible for any custom handling for that host. If no host-specific include exists, then the global include does it's default behavior. - brian On Nov 7, 2004, at 2:56 PM, eLists wrote: > Hi Brian, > > Brian Fries wrote: >> I much prefer to keep complex code like this in an include file, so >> the errormessages.db would have a much simpler entry like this: >> TemplateNotFound [include (your include file)] > > That makes a lot of sense :) Do you put that include file in the > globals? > >> This way you can modify the include file without having to mess with >> the errormessages.db, which makes debugging and site changes easier. >> I see a missing "]" in the "[showif [numfound=0]" near the end... > > Not surprising :) Thanks, it helps to have another set of eyes looking > - I will check that out. > >> Did you restart WebDNA after modifying the errormessages.db? This may >> be necessary to ensure that WebDNA sees the changes. > > Sure did. I spent a bit of time looking in the archives and found a > few other suggestions on how other folks deal with stuff in regards to > the ErrorMessages.db as well. > >> - brian > > Thanks for your time. > > drt > >> On Nov 7, 2004, at 12:22 PM, eLists wrote: >>> Hello, >>> >>> I have a site I just moved from 4.51 to 6.0 on linux. I am using the >>> errors db to redirect requests styled a certain way, unfortunately >>> it does not seem to work on the 6.0 install. >>> >>> The 'normal' link would be styled as: >>> http://www.bear.net/bears/details.html?record_id=10198944095185228 >>> >>> The 'easy' links I am promoting, which would re-direct to the above >>> would be: >>> >>> http://www.bear.net/profiles/Sandrobear/ >>> >>> The below entry in the ErrorMssages.db is what was working on the >>> 4.5 install, but does not work on 6.0. >>> >>> I am guessing that maybe I Was just lucky that it worked on the 4.51 >>> and the way I wrote it apparently breaks something on 6.0 - any >>> suggestions? >>> >>> I basically look for a request in the /profiles/ directory (which >>> does in fact exist on the server) the do a search on the last part >>> - the username - in the database and then do a re-direct to the >>> original long URL. If it were to stay at the shorter URL that would >>> also be fine. The problem is accessing a link with the name vs. the >>> record ID no longer works. >>> >>> >>> --- ErrorMessages.db record --- >>> TemplateNotFound [hideif [thisurl]^/profiles]Error: template >>> '[param1]' not found[/hideif][showif [thisurl]^/profiles][ListWords >>> Words=[thisurl]&Delimiters=/][showif [index]=2][text >>> show=f]nick=[word][/text][/showif][/ListWords][search >>> db=/databases/bears.db&eqWebNickDatarq=[url][nick][/ >>> url]&eqprocessDatarq=1][numfound][hideif >>> [numfound]=0][founditems][REDIRECT >>> url=http://www.bear.net/bears/details.html? >>> record_id=[record_id]][record_id]>> bgcolor="#FFFFFF">

>> href="http://www.bear.net/bears/details.html? >>> record_id=[record_id]][record_id]">If not redirected click >>> here[/founditems][/hideif][/search][/ >>> showif][showif [numfound=0][REDIRECT >>> url=http://www.bear.net/profiles/?request=[thisurl]][/showif] >>> >>> >> -- Brian Fries, BrainScan Software -- >> http://www.brainscansoftware.com -- ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Brian Fries

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

To Do list (2003) Multihoming and webcat (1998) Site Builder & IE Mac (2004) [OT] SSL security in browser (2005) Tab Charactor (1997) Bug? (1997) Multiple cart additions (1997) Nested Includes (2001) Multiple fields on 1 input (1997) WebCat2 beta 11 - new prefs ... (1997) OT: SSL Certs (2005) 2nd WebCatalog2 Feature Request (1996) Shell script within a sandbox (2005) texta,b,c,d,e (urgent) (2003) LOG IN LOG OUT (1997) ANother SHOWIF problem (1997) Location of Browser Info.txt file (1997) webdelivery.html and webna (1997) Trouble with formula.db + more explanation (1997) Summary search -- speed (1997)