This topic is locked

Checkbox bug?

3/31/2009 2:11:29 AM
PHPRunner General questions
A
Adencomp author

Greetings,
I am currently trialing PHPRunner 5.0 (current release) fo possible use in a new project. As a test, I decided to build a simple site to provide an interface to an existing site/database I have for cataloging my books. This bug may be due to an incompatability with the existing database structure...but IMHO is nevertheless a bug.
One of my fields is handled as a boolean Y/N to indicate whether a book has been covered in plastic, or not. This field is defined as a CHAR(1). Not surprisingly, the values in this field did not work properly with PHPRunner, but after some testing I changed the values from Y/N to 1/0. After making this change, the functionality basically works...but not entirely.
Summary of what does, and does not work:

  • View page works properly
  • Inline editing does not allow changing the checkbox
  • View page works
  • Edit page properly allows changing of values, but does not display the checkbox as ticked for a 1 value
    Changing the field type to TINYINT (without re-building the project, so PHPRunner may still be misinterpreting the field type) does not change any of these behaviours.
    Attempting to re-import the data from the database (1/0 values showing in Results tab of query page) also changed nothing - I don't know if that would be sufficient to make PHPRunner fully interpret the field and type - or if this is simply a bug that is not related to my existing database/data/structure.
    I hope this can be addressed (somehow) soon, whether with a bug, or a trial extension . Finding a bug (that may not be fixed before the trial expires) within the first few hours of assessment make it difficult to make a good recommendation to a new customer.
    Thanks for your time.
    Regards,

    Paul

J
Jane 3/31/2009

Paul,
I wasn't able to reproduce this error with 1/0 values.

Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.

A
Adencomp author 4/4/2009

Hello Jane,
Thanks for your response. I have confirmed that this bug is in the way PHPR handles the types in an existing bug, and (apparently) not updating after the database was changed. While 0/1 are perfectly valid contents of a CHAR(1) field, PHPRunner would only partially work with them (as posted originally).
When I re-created by sample project from scratch, with the new TINYINT field type, it worked fine. While this is not a problem during testing - recreating a project from scratch is not really an appropriate solution in a major commercial project (such as I am hoping to start soon).
I think if you create a database with a CHAR(1) field that you wish to use as a checkbox, you'll see the issue I'm referring to. If not, let me know and I'll post my database definition here for your reference.

Sergey Kornilov admin 4/5/2009

Checkbox requires a numeric field to work. It won't work with CHAR(1) type as it stores text values like '0' and '1'.

A
Adencomp author 4/6/2009

Perhaps this is the source of confusion.
How is a '1' different from a 1? CHAR(1) is perfectly capable of storing a '1' or a '0'. And, as I pointed out originally, PHPRunner did in fact work this way...but only in some places. Why not update the other places where it didn't work properly?
If that is not an option, then how can one force an update within an existing project, to recognise that the field type has been changed, without having to re-create the project from scratch? As you can see, I did in fact change the field type, since the problem was obvious. But the resolution eluded me...all I could do ws work around it by starting from scratch again.
Please rest assured that I understand the problem quite well...what I'm looking for is a meaningful way to address the problem.

J
Jane 4/6/2009

Hi,
I recommend you to synchronize database and project settings (changes database and then open your project or use sync option in the PHPRunner 5.1) instead of re-create project from scratch.

Also please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages where I can see what doesn't work properly. If it's an error we'll fix it.