The max=0 issue is a bug ...

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 29271
interpreted = N
texte = >> I learned more about this issue. It seems I can set a variable named max to >> a value of 9 before a search context, and it keeps the value of 9 >> everywhere on the page *except* inside the search context, where it changes to >> a value of 0 for some unknown (and undocumented) reason. >> >> What's going on here? All I'm trying to do is use: >> >> [showif [numfound]>[max]] >> Show more items ...
>> [shownext] >> [/shownext] >> [showif] >> >> inside my search context in order to show or hide the enclosed text and webdna >> code. So why is webcatalog changing my preset max variable value from 9 to >> 0 in this code? >> >> And why is this behavior not documented? >> Or is this just another bug in your software? > > >Ken, within a search, max is a parameter of the search. &max=20 for >example.Well, if max is within a search *tag*, then yes it can be a search parameter. But that's not what I said ...I said the [max] tag is inside the search *context*, and in this case max is nothing more than a variable -- just like any other variable -- and it should not be changed arbitrarily by webcatalog.This is clearly a bug and it needs to be fixed ... :( >It would make sense not to use variables with names such as max, >append, replace, delete, shownext, startat, AllReqd, group1field, AllHit, >AllCase, allBLNK etc.This has nothing to do with the problem. Every parameter name above -- except for max -- can be passed into a search tag or context normally, and it will still have the same value INSIDE the search tag or context that it had OUTSIDE that tag or context.The only thing that can change this situation is if the variable is a text or math variable and its value is being changed by preceeding webdna code, and that is NOT the case here. Webcat is arbitrarily changing the [max] value to zero on its own here ...I discovered this bug when I set my startat value in the exact same way I set my max on this page -- by using this code at the very top of the page:[text]max=9[/text] [text]startat=1[/text]After setting these values, my [startat] tag had the exact same value ALL OVER THE PAGE -- including INSIDE the search context. But the [max] tag had a *different* value depending upon whether was inside or outside the search context. Both ouside and inside the search context, [startat] was always 1. But the [max] value was 9 outside and 0 inside ...And this indicates a bug in the software.If you are interested in the results of my testing, here it is. I even threw in a few of the parameter names listed above to prove that they work just fine inside as variable names inside a search context. The following info shows clear evidence that ANY of these names as variables --EXCEPT max -- work properly:This code sets the following text variable values at the top of the page:[text]startat=1[/text] [text]max=9[/text] [text]append=okay[/text] [text]shownext=okay[/text] [text]AllHit=okay[/text] [text]allBLNK=okay[/text] This set of test tags is used in various positions on the page to show what the values are in those positions:startat=[startat]
max=[max]
append=[append]
shownext=[shownext]
AllHit=[AllHit]
allBLNK=[allBLNK]
When the above tags are used above and outside the search context, these are the values, and they are all correct:startat=1 max=9 append=okay shownext=okay AllHit=okay allBLNK=okay But here are the values *INSIDE* the search context. As you can see, they are mostly the same as the values outside the search context -- EXCEPT for the max value. There is nothing in my code before the search context which changes the [max] value from 1 to 0 -- webcatalog is creating this problem on its own:startat=1 max=0 <--- THIS SHOULD BE max=9 NOT max=0. append=okay shownext=okay AllHit=okay allBLNK=okay And here are the values below and outside the search context. As you can see, they are all exactly the same as the values above and outside the search context, and once again the [max] tag has a value of 9 which is what it should have:startat=1 max=9 append=okay shownext=okay AllHit=okay allBLNK=okayThis evidence leads me to the conclusion that there is a webcat bug that is screwing up the value of the [max] variable inside the search context, and maybe other contexts as well, but I have not tested other contexts.However, I have tested the above situations to see if passing a max value of 20 into the page as a formvariable would *possibly* override the 0 value webcat is redefining as the [max] value inside the search context, and it does not. My results indicate that using a max formvariable has no affect on the [max] value inside the search context.In other words, it doesn't matter what method you use to set a [max] value in your templates, because webcatalog is going to reset that value to 0 inside your search context whether you want it to or not. And since it should not be doing this, I believe this is a bug.What's amazing to me is that no one else has uncovered this bug before now. It seems like it must be a common practice to use a showif comparison inside a search context to compare [numfound] with [max] to determine whether or not to show some leading text before the shownext code ...================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================------------------------------------------------------------- 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 Associated Messages, from the most recent to the oldest:

    
  1. IE bug... (was: Re: The max=0 issue is a bug ... CALL TO ACTION (Joseph D'Andrea 2000)
  2. Re[2]: The max=0 issue is a bug ... (Kenneth Grome 2000)
  3. Re[2]: The max=0 issue is a bug ... (jpeacock@univpress.com 2000)
  4. Re: The max=0 issue is a bug ... CALL TO ACTION (Mike Davis 2000)
  5. Re: The max=0 issue is a bug ... (Kenneth Grome 2000)
  6. Re: The max=0 issue is a bug ... CALL TO ACTION (Clint Davis 2000)
  7. Re: The max=0 issue is a bug ... CALL TO ACTION (Chuck Rice 2000)
  8. Re: The max=0 issue is a bug ... CALL TO ACTION (Kenneth Grome 2000)
  9. Re: The max=0 issue is a bug ... CALL TO ACTION (Mike Davis 2000)
  10. Re: The max=0 issue is a bug ... CALL TO ACTION (Chuck Rice 2000)
  11. Re: The max=0 issue is a bug ... CALL TO ACTION (Jesse Proudman 2000)
  12. Re: The max=0 issue is a bug ... CALL TO ACTION (Mike Davis 2000)
  13. Re: The max=0 issue is a bug ... (John Butler 2000)
  14. The max=0 issue is a bug ... (Kenneth Grome 2000)
>> I learned more about this issue. It seems I can set a variable named max to >> a value of 9 before a search context, and it keeps the value of 9 >> everywhere on the page *except* inside the search context, where it changes to >> a value of 0 for some unknown (and undocumented) reason. >> >> What's going on here? All I'm trying to do is use: >> >> [showif [numfound]>[max]] >> Show more items ...
>> [shownext] >> [/shownext] >> [showif] >> >> inside my search context in order to show or hide the enclosed text and webdna >> code. So why is webcatalog changing my preset max variable value from 9 to >> 0 in this code? >> >> And why is this behavior not documented? >> Or is this just another bug in your software? > > >Ken, within a search, max is a parameter of the search. &max=20 for >example.Well, if max is within a search *tag*, then yes it can be a search parameter. But that's not what I said ...I said the [max] tag is inside the search *context*, and in this case max is nothing more than a variable -- just like any other variable -- and it should not be changed arbitrarily by webcatalog.This is clearly a bug and it needs to be fixed ... :( >It would make sense not to use variables with names such as max, >append, replace, delete, shownext, startat, AllReqd, group1field, AllHit, >AllCase, allBLNK etc.This has nothing to do with the problem. Every parameter name above -- except for max -- can be passed into a search tag or context normally, and it will still have the same value INSIDE the search tag or context that it had OUTSIDE that tag or context.The only thing that can change this situation is if the variable is a text or math variable and its value is being changed by preceeding webdna code, and that is NOT the case here. Webcat is arbitrarily changing the [max] value to zero on its own here ...I discovered this bug when I set my startat value in the exact same way I set my max on this page -- by using this code at the very top of the page:[text]max=9[/text] [text]startat=1[/text]After setting these values, my [startat] tag had the exact same value ALL OVER THE PAGE -- including INSIDE the search context. But the [max] tag had a *different* value depending upon whether was inside or outside the search context. Both ouside and inside the search context, [startat] was always 1. But the [max] value was 9 outside and 0 inside ...And this indicates a bug in the software.If you are interested in the results of my testing, here it is. I even threw in a few of the parameter names listed above to prove that they work just fine inside as variable names inside a search context. The following info shows clear evidence that ANY of these names as variables --EXCEPT max -- work properly:This code sets the following text variable values at the top of the page:[text]startat=1[/text] [text]max=9[/text] [text]append=okay[/text] [text]shownext=okay[/text] [text]AllHit=okay[/text] [text]allBLNK=okay[/text] This set of test tags is used in various positions on the page to show what the values are in those positions:startat=[startat]
max=[max]
append=[append]
shownext=[shownext]
AllHit=[AllHit]
allBLNK=[allBLNK]
When the above tags are used above and outside the search context, these are the values, and they are all correct:startat=1 max=9 append=okay shownext=okay AllHit=okay allBLNK=okay But here are the values *INSIDE* the search context. As you can see, they are mostly the same as the values outside the search context -- EXCEPT for the max value. There is nothing in my code before the search context which changes the [max] value from 1 to 0 -- webcatalog is creating this problem on its own:startat=1 max=0 <--- THIS SHOULD BE max=9 NOT max=0. append=okay shownext=okay AllHit=okay allBLNK=okay And here are the values below and outside the search context. As you can see, they are all exactly the same as the values above and outside the search context, and once again the [max] tag has a value of 9 which is what it should have:startat=1 max=9 append=okay shownext=okay AllHit=okay allBLNK=okayThis evidence leads me to the conclusion that there is a webcat bug that is screwing up the value of the [max] variable inside the search context, and maybe other contexts as well, but I have not tested other contexts.However, I have tested the above situations to see if passing a max value of 20 into the page as a formvariable would *possibly* override the 0 value webcat is redefining as the [max] value inside the search context, and it does not. My results indicate that using a max formvariable has no affect on the [max] value inside the search context.In other words, it doesn't matter what method you use to set a [max] value in your templates, because webcatalog is going to reset that value to 0 inside your search context whether you want it to or not. And since it should not be doing this, I believe this is a bug.What's amazing to me is that no one else has uncovered this bug before now. It seems like it must be a common practice to use a showif comparison inside a search context to compare [numfound] with [max] to determine whether or not to show some leading text before the shownext code ...================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================------------------------------------------------------------- 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 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:

RE: [taxRate] [TaxTotal] ? (1997) WC Database Format (1997) Just Testing (1997) Animation/Flash (2002) F3 crashing server (1997) THANKS (1997) Simple way to create unique SKU (1997) Warning: Mac OS X 10.2.4 Update Overwrites Apache's (2003) Searching for ALL / empty form field (1997) CMSBuilder (2004) Email template names (1997) [group] ? (1997) Math (1997) Hiding Email Addresses (2003) Adding up line items. (2000) new WebDNA 5 command reference (2003) encrypt (2000) RE: Questions To Answer (1997) [Price] (1997) WebCat2 beta 11 - new prefs ... (1997)