Closed (fixed)
Project:
Profile Checkboxes
Version:
6.x-1.1
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 May 2010 at 14:14 UTC
Updated:
1 Jun 2010 at 21:06 UTC
Jump to comment: Most recent file
Comments
Comment #1
johnhanley commentedHmmm, I'm not sure what to make of this.
Please post some screen shots of the various pages.
Comment #2
jpcwebb commentedSee attached - first shot shows field editing screen with list of values, second shows the profile editing screen with checkboxes, 3rd shows the view of the profile
Comment #3
johnhanley commentedThe screen shots are very helpful--thanks.
I believe this is happening because the option values are being interpreted as numeric. A proper solution should be devised, but for testing purposes would it be possible to add a frequency abbreviation after each option? This will insure the values are stored as strings and not integers.
Please try and report back.
Comment #4
jpcwebb commentedThat made no difference to existing data, but editing and resetting the data for a user made it work after editing the profile checkbox labels. So your theory appears to be correct - suggest it perhaps needs a CAST statement in the sql
Comment #5
johnhanley commentedWhat's happening here is that numeric values are loaded into the options array starting at array element 0. For example:
array[0] = 665
array[1] = 675
array[2] = 685
...and so on.
This is the way PHP is designed.
The solution is to convert the numeric value to a string, but the options array is loaded in the core Profile module and not Profile Checkboxes.
Therefore the workaround (albeit less than ideal) is to use string values so the array key/value are the same. In your case you'll need to add a suffix of some kind to your frequency values.
Comment #6
jpcwebb commentedThanks for following up. Agreed, the fix is beyond this module's scope, but I believe it would be helpful to nevertheless formally document this quirk in Profile Checkboxes to save future support queries/ spurious bug reports.
Comment #7
johnhanley commentedHopefully this thread will be helpful to others experiencing the same problem. Thanks again for raising awareness.
I'm closing the issue for now, but please re-open if you or someone come-up with a better workaround or outright solution.