Page 1 of 1

Use of Check Boxes

PostPosted: Wed Feb 18, 2009 3:20 pm
by andperry
By the way I'm completely new to Xataface - just downloaded it today!

A number of fields that are Boolean in the MySQL database are set up as checkboxes in the Xataface application. On my local host computer everything is fine, but on the real web server the word Array appears in bold to the right of each check box.

Both installations are accessing the same MySQL database (on the real web server), but may be running different versions of PHP. Any clues?

Thanks,

Andrew Perry.

PostPosted: Thu Feb 19, 2009 9:48 am
by shannah
This is very strange. Can you provide some more info about the environments? E.g. PHP versions, MySQL version. Can you show me the relevant portions of the fields.ini file?

PostPosted: Thu Feb 19, 2009 2:26 pm
by andperry
Many thanks for the reply.

Local Host - PHP 5.2.6 running under Apache/Windows.

Online Web Server - PHP 5.2.8 & MySQL 5.0.67 running under Apache/Unix.

Extract from fields.ini file:-

[auto_values]
widget:label = Auto Values
widget:type = Checkbox
widget:description = "Flag to indicate that the date & time information are to be automatically derived from the filename."

[guest_service]
widget:label = Guest Service
widget:type = Checkbox

[hidden]
widget:type = Checkbox
widget:description = "If set - causes the item to not normally be displayed on the web page."

[locked]
widget:type = Checkbox
widget:description = "If set - causes the message 'Download Not Ready' to appear on the web page."

[double_locked]
widget:label - Double Locked
widget:type = Checkbox
widget:description = "Used to double-lock the 'Locked' flag (for use in command line SQL queries only)."

[mark_delete]
widget:label= Mark Delete
widget:type = Checkbox
widget:description = "Flag to indicate that the item is marked for deletion."

[delete_confirm]
widget:label= Delete Confirm
widget:type = Checkbox
widget:description = "Flag to confirm that the item can now be deleted."


The associated fields in the database are Boolean (i.e. TINYINT(1)) variables. Hope this info is of help.

Many thanks,

Andrew.

PostPosted: Thu Feb 19, 2009 2:43 pm
by andperry
I don't know if this is relevant to the above problem, but I have noticed another strange difference between the two installations. On the online server, an autocomplete box does not pick up the list and if the widget type is changed to yui_autocomplete then the page won't even load. Everything works fine on local host.

PostPosted: Thu Feb 19, 2009 2:45 pm
by andperry
Oops - I've noticed in the above script the line

widget:label - Double Locked

It is actually

widget:label = Double Locked

in the real script.

PostPosted: Thu Feb 19, 2009 4:23 pm
by shannah
Is the test server on windows and the live server on linux?
Code: Select all
widget:type = Checkbox

should be
Code: Select all
widget:type = checkbox


Nice the lower case 'c' on checkbox. On linux everything is case sensitive. On windows some things are and some things aren't.

Let me know if this works.

-Steve

PostPosted: Fri Feb 20, 2009 1:40 pm
by andperry
Hi Steve,

Yes the test server is Windows and the live server Unix, and as expected the solution works!

Although I was aware that everything is case-sensitive on Unix platforms it would probably have never occurred to me that this was the cause of the problem. So very many thanks for your help.

Regards,

Andrew.