Use of Check Boxes

A place for users and developers of the Xataface to discuss and receive support.

Use of Check Boxes

Postby andperry » Wed Feb 18, 2009 3:20 pm

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.
andperry
 
Posts: 57
Joined: Wed Feb 18, 2009 9:20 am
Location: Wirral, UK

Postby shannah » Thu Feb 19, 2009 9:48 am

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?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby andperry » Thu Feb 19, 2009 2:26 pm

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.
andperry
 
Posts: 57
Joined: Wed Feb 18, 2009 9:20 am
Location: Wirral, UK

Postby andperry » Thu Feb 19, 2009 2:43 pm

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.
andperry
 
Posts: 57
Joined: Wed Feb 18, 2009 9:20 am
Location: Wirral, UK

Postby andperry » Thu Feb 19, 2009 2:45 pm

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.
andperry
 
Posts: 57
Joined: Wed Feb 18, 2009 9:20 am
Location: Wirral, UK

Postby shannah » Thu Feb 19, 2009 4:23 pm

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby andperry » Fri Feb 20, 2009 1:40 pm

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.
andperry
 
Posts: 57
Joined: Wed Feb 18, 2009 9:20 am
Location: Wirral, UK


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 9 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved