Checkboxes in search page

I believe there is a bug with checkboxes when used on a search page. Using Dolphin 7.0.9.

You can see the page in question here: http://social.rednoodle.com/search_home.php

1) The final html sourcecode for the checkbox has an empty value. In the Profile Field Builder I put in various default values, like 1 or yes or true, to no effect. There isn't anywhere else to set it. The value attribute is always empty.
<input  class="form_input_checkbox" type="checkbox" name="Archery" value="" />

2) Looking at the query string sent to search.php, I see the Archery variable empty,   ...&Archery=&...
If I manually change the query string to ...&Archery=1&... I get a database error. It looks like the function collectSearchRequestParams() in BxDolProfileFields is returning a boolean but in the database that field is a tinyint. Perhaps that is the immediate cause of the database error.

So there appears to be one problem when writing the checkbox to the search form, and a second problem when trying to process it.

 

 

 

Quote · 11 Jan 2013

not sure about that being a bug..

your site throws this error trying to search..

array(6) { ["Country"]=> array(1) { [0]=> string(2) "US" } ["BizInterestTopLevel"]=> array(1) { [0]=> string(10) "Automotive" } ["Biz2"]=> array(1) { [0]=> string(6) "Choose" } ["PersInterestsTopLevel"]=> array(1) { [0]=> string(6) "Sports" } ["PersInterestsBtmLevel"]=> array(1) { [0]=> string(17) "American football" } ["SAE_Chapters"]=> array(1) { [0]=> string(1) "4" } } 

Warning: Cannot modify header information - headers already sent by (output started at /home/rednoodl/public_html_social/search.php:232) in /home/rednoodl/public_html_social/inc/design.inc.php on line 133

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 11 Jan 2013

I would also look towards the template..

look at this page and the error at the top

http://social.rednoodle.com/search.php?show=featured

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 11 Jan 2013

That output comes from a var_dump command I put in there on the array $aRequestParams as a diagnostic.

If I get rid of the var_dump, it won't show the array output and won't complain about the headers, but the behavior is still the same. Which is to say, the search ignores the checkbox, with all the details from my post below remaining true.

Thanks though.

I still believe there to be a bug.

------------------

More info:

In BxDolProfileFields in function collectSearchRequestParams() line 834, there is this case statement:

                    case 'bool':
                        if( isset( $_REQUEST[$sItemName] ) and $_REQUEST[$sItemName] )
                            $mValue = true;
                    break;

With variable being empty in the query string, 
....&Archery=&...
the if statement skips. So I still say that the checkbox as written to the search form shouldn't have an empty value attribute,

value='""

 

 

Quote · 11 Jan 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.