Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] Bolean in combo filter bug

[FIXED] Bolean in combo filter bug 07 Oct 2012 15:01 #4301

  • dyvel
  • dyvel's Avatar
  • Offline
  • Elite Member
  • Posts: 200
  • Thank you received: 11
  • Karma: 10
Hi

I just came across what seems to be a bug when using a bolean type in a combo box filter.



The problem: when I select yes, then it filter as expected, but when I select no in my combo, it resets to default with no filter.

I have only tested on 2.0 beta
Last Edit: 07 Oct 2012 15:01 by dyvel.
The administrator has disabled public write access.

Re: Bolean in combo filter bug 09 Oct 2012 08:23 #4344

  • jroberge
  • jroberge's Avatar
  • Offline
  • Junior Member
  • Posts: 23
  • Karma: 0
Hello dyvel,

I get a similar behaviour from the front end. My filter is a "Yes" or "No" combo box and both empty and 0 values get the selected mark in the select, which means that the value of the second option is always retained.

The function producing the combo box does not seem to make the difference between null and 0. Where is that function?
The administrator has disabled public write access.

Re: Bolean in combo filter bug 10 Oct 2012 07:45 #4352

  • nvgogh
  • nvgogh's Avatar
  • Offline
  • Junior Member
  • Posts: 22
  • Thank you received: 2
  • Karma: 0
Same for me. 'Yes' works, but 'No' doesn't
The administrator has disabled public write access.

Re: Bolean in combo filter bug 10 Oct 2012 17:10 #4370

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
++
The administrator has disabled public write access.

Re: Bolean in combo filter bug 16 Oct 2012 15:12 #4569

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
Fixed.
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy, nvgogh

Re: Bolean in combo filter bug 24 Oct 2012 17:37 #4715

  • dyvel
  • dyvel's Avatar
  • Offline
  • Elite Member
  • Posts: 200
  • Thank you received: 11
  • Karma: 10
It just tested this with a new component I'm cooking and I still see this problem.
The administrator has disabled public write access.

Re: Bolean in combo filter bug 24 Oct 2012 17:43 #4716

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Are you using v1.5 or 2.0?

Please could you provide all of your config and environment details...

I had a ticket open with the same issue and can confirm that in version 2, this behaviour has been fixed - please see j-cook.pro/forum/18-closed-tickets/4455-...olean-fields-cook-v2

********EDIT*********
I can confirm that this works in both front and back ends of component in cook v2.0

Please see above link to compare my config with yours if you are still facing this issue in V2.0.
Also, try rebuilding your files and then re-run sandbox if its still not working as expected.
***********************

Hope this helps,

Gez

P.S. I will now double check that this is still working and edit this post with the results to confirm 100%
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
Last Edit: 24 Oct 2012 17:55 by JoomGuy. Reason: ADDED confirmation front and back working in v2
The administrator has disabled public write access.

Re: Bolean in combo filter bug 24 Oct 2012 17:56 #4717

  • dyvel
  • dyvel's Avatar
  • Offline
  • Elite Member
  • Posts: 200
  • Thank you received: 11
  • Karma: 10
2.0 beta tested in sandbox.

I looked at your case, and it seem similar, but as I said - I just created a component and added 3 filters. 2 of them are bolean type, and they work with yes case, but no redirects to default like I originally wrote and like your case.
The administrator has disabled public write access.

Re: Bolean in combo filter bug 24 Oct 2012 17:58 #4718

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
What's your other filter type and is it working?

Are you getting any errors in console?

***********ADD***************
In the 'no' case, does the filter automatically reset to the label? That was the behaviour I remember before it was fixed

Also, could you post your entire config please? It might help narrow down the issue
********************************

Cheers,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
Last Edit: 24 Oct 2012 18:00 by JoomGuy.
The administrator has disabled public write access.

Re: Bolean in combo filter bug 24 Oct 2012 18:01 #4719

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
... See edit
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Bolean in combo filter bug 24 Oct 2012 18:03 #4720

  • dyvel
  • dyvel's Avatar
  • Offline
  • Elite Member
  • Posts: 200
  • Thank you received: 11
  • Karma: 10
I've tried the same config as you listed, but with the same result. My other filter is an Enumeration type, and it works just fine. The behavior of the bolean filter is like your case. Selecting no defaults back to label
The administrator has disabled public write access.

Re: Bolean in combo filter bug 24 Oct 2012 18:10 #4721

  • dyvel
  • dyvel's Avatar
  • Offline
  • Elite Member
  • Posts: 200
  • Thank you received: 11
  • Karma: 10
DAMMIT!!!

I forgot to select 2.0 beta when I created the component, so it was on the old 1.5. On 2.0 beta I can also confirm the bug is fixed, but not in 1.5 :-)

For me - problem solved :-)
Last Edit: 24 Oct 2012 18:11 by dyvel.
The administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy

Re: Bolean in combo filter bug 24 Oct 2012 18:14 #4722

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Were you previously using Mootools by any chance?

If so, my guess is that you have now got an issue with caching and cache should be flushed, maybe even log in and out, rebuild...

If I remember correctly, mootools handles set the values of select boxes slightly differently which might be the cause... the jquery part of the script to reset the filters should look like:
if ($('filter_competition') != null)
	    $('filter_competition').value='';
where filter_competition is my boolean filter for the competition field.

AND the select box code itself...
<div style="float:left">
<!-- SELECT : Competition  -->

<div class='filter filter_competition'>
	<select id="filter_competition" name="filter_competition" class="inputbox " onchange="submitbutton();">
	  <option value="">- Competition -</option>
	  <option value="0" selected="selected">No</option>
	  <option value="1">Yes</option>
        </select>
</div>

Hope it helps,
Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

[FIXED]Re: Bolean in combo filter bug 24 Oct 2012 18:16 #4723

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
dyvel wrote:
DAMMIT!!!

I forgot to select 2.0 beta when I created the component, so it was on the old 1.5. On 2.0 beta I can also confirm the bug is fixed, but not in 1.5 :-)

For me - problem solved :-)

I got caught out on that once too - with a different issue but, nonetheless, caught out! ;)

Glad it's resolved!
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.
The following user(s) said Thank You: admin

Re: [FIXED]Re: Bolean in combo filter bug 24 Oct 2012 18:17 #4724

  • dyvel
  • dyvel's Avatar
  • Offline
  • Elite Member
  • Posts: 200
  • Thank you received: 11
  • Karma: 10
Me too :-)
Thank you for your time ...
The administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy
Time to create page: 0.117 seconds

Get Started