[WebDNA] [replacefounditems] fails

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 104140
interpreted = N
texte = I think there's some kind of bug in replacefounditems, I couldn't get it to replace both of the values I was trying to replace, it would only replace one -- the same one each time -- even when I switched their positions inside the replacefounditems context. At first I thought it might be a problem with their positions, that's why I switched them, but it didn't matter because only one would get replaced and the other was ignored consistently. Then I thought it might be a db format issue but that wasn't it either. Then I thought that because one of the field names was "cookie" that might be the problem so I changed it to kookie but that still didn't help. I checked my formvariables and all the values were being passed as expected, the only problem was that the replacefounditems was only replacing one of the two values it contained. Both values were URLed and I did not try NOT URLing them so maybe that's the problem. I spent close to 2 hours on this just trying to figure out what was wrong with my code, when all the time there was nothing wrong with my code at all. It was just a screw-up in the replacefounditems context that was causing the problem -- and I'm sure of this because when I eventually decided to use a [replace] context I used the exact same parameter string inside the replace that I was using in the replacefounditems ... and both values were replaced properly the very first time I tried it. Very strange. This is the first time I've seen such behavior, but it makes me distrust using replacefounditems now. It would be interesting to hear if anyone else has seen replacefounditems fail when more than one value is being replaced, and/or if anyone has seen strange behavior like this when the values are URLed. I just don't get it, but it leaves me thinking that this may really be a bug in the software. Sincerely, Kenneth Grome www.KenGrome.com Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] [replacefounditems] fails (Govinda 2009)
  2. Re: [WebDNA] [replacefounditems] fails (Bob Minor 2009)
  3. Re: [WebDNA] [replacefounditems] fails (Kenneth Grome 2009)
  4. Re: [WebDNA] [replacefounditems] fails (Bob Minor 2009)
  5. Re: [WebDNA] [replacefounditems] fails (Kenneth Grome 2009)
  6. Re: [WebDNA] [replacefounditems] fails (Donovan 2009)
  7. [WebDNA] [replacefounditems] fails (Kenneth Grome 2009)
I think there's some kind of bug in replacefounditems, I couldn't get it to replace both of the values I was trying to replace, it would only replace one -- the same one each time -- even when I switched their positions inside the replacefounditems context. At first I thought it might be a problem with their positions, that's why I switched them, but it didn't matter because only one would get replaced and the other was ignored consistently. Then I thought it might be a db format issue but that wasn't it either. Then I thought that because one of the field names was "cookie" that might be the problem so I changed it to kookie but that still didn't help. I checked my formvariables and all the values were being passed as expected, the only problem was that the replacefounditems was only replacing one of the two values it contained. Both values were URLed and I did not try NOT URLing them so maybe that's the problem. I spent close to 2 hours on this just trying to figure out what was wrong with my code, when all the time there was nothing wrong with my code at all. It was just a screw-up in the replacefounditems context that was causing the problem -- and I'm sure of this because when I eventually decided to use a [replace] context I used the exact same parameter string inside the replace that I was using in the replacefounditems ... and both values were replaced properly the very first time I tried it. Very strange. This is the first time I've seen such behavior, but it makes me distrust using replacefounditems now. It would be interesting to hear if anyone else has seen replacefounditems fail when more than one value is being replaced, and/or if anyone has seen strange behavior like this when the values are URLed. I just don't get it, but it leaves me thinking that this may really be a bug in the software. Sincerely, Kenneth Grome www.KenGrome.com Kenneth Grome

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:

SV: Mass Mail (2000) bug in [SendMail] (1997) [urgent] Phone number at SM (2006) [WebDNA] What is lateset ver. of Apache supported? (2008) SKU Question (1999) [format xs] freeze (1997) First postarg not taking in $Commands (1997) Cold Fusion Warm and Fuzzy? (1999) Couple of questions (1999) WebCat2.0 acgi vs plugin (1997) The Box - (2003) ANYONE (1999) Email Newsletters (2003) Reload adding to cart (2001) emailer settings and control questions (1997) Multiple security dbs (1997) Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997) Resending - Please help (1998) URL too Long? (1997) [shell] (2002)