Page 1 of 1

PostPosted: Tue Apr 25, 2006 3:35 am
by njw
Hi Steve

Probably something I don't understand properly.

I have a table Person that contains rudimentary data about people, including phone number - see definition below:

Person








FieldTypeNullDefault
PersonIdint(11)No
Surnamevarchar(40)No
Forenamesvarchar(64)No
Emailvarchar(40)YesNULL
Phonevarchar(40)YesNULL
CommentslongtextYesNULL



In the fields.ini I have the following lines:

[Phone]
widget:atts:size = 20
validators:required = false

Yet, when I go to the entry form, Phone is flagged as required.

Any idea what I've got wrong?

Many thanks

Neil

PostPosted: Tue Apr 25, 2006 7:18 am
by shannah
Hi Neil,

Unfortunately you must use 0 to indicate false, as the PEAR_Config class (which datface uses to load its ini files) reads "false" as the string "false" and not the boolean value false, so that "false" actually means true!.

I sent in a bug report to PEAR_Config about this a while back but they decided that it is just a documentation issue(i.e., they're not going to change it).

Hope this helps.

-Steve

PostPosted: Tue Apr 25, 2006 8:52 am
by njw
and I thought M$ were the only ones who had bugs called features!

PostPosted: Wed Apr 26, 2006 7:49 am
by njw
Sorry Steve - tried that:

[Phone]
widget:atts:size = 20
validators:required = 0

Stil comes up as a required field.

Neil

PostPosted: Wed Apr 26, 2006 10:36 am
by shannah
Hi Neil,

I have filed a bug report and submitted a fix for this issue at:
http://sourceforge.net/tracker/index.php?func=detail&aid=1477096&group_id=153729&atid=788932

Best regards

Steve

PostPosted: Thu Apr 27, 2006 2:24 am
by njw
Thanks Steve. Works fine.

Neil

PostPosted: Sun Nov 19, 2006 5:36 am
by ozrebel
Hi Steve.

Firstly please let me say that this is one of the best pieces of software I reckon I've ever found on the net! Great work, and a terrific helpful website.

Now, on to my problem :)

I am also having the same problem as outlined above. I have downloaded the updated Table.php file as indicated in the tracker, but get the following error:

Fatal error: Call to undefined function: getactions() in /home/mistro/public_html/dataface/Dataface/ActionTool.php on line 71

Interestingly, the fields which are showing up as required all appear to have collation set, and any fields which I have in the database without collation set are not defaulting to required.

Unfortunately phpMyAdmin will not allow me to change fields to blank collation, and adding new fields defaults to ASCII collation delivering the same problem.

Any clues?

Cheers

Tony

PostPosted: Mon Nov 20, 2006 3:30 pm
by shannah
Hi Tony,

The tracker reference in this thread is a little old now. If you're using a more recent version of Dataface, it will have a newer version of Table.php in it. Recommend you re-download the latest Table.php file from sourceforge and go from there.

Let me know how it goes.

Best regards

Steve

PostPosted: Tue Nov 21, 2006 11:42 am
by ozrebel
G'day Steve.

Thanks for your reply.

I have re-downloaded dataface-0.6.9r1 package, extracted, and replaced my current table.php file with the one in the package, and there has been no change - still all non numeric fields displaying as required by default, and unchangable with validators set to either 0 or false.

Cheers

Tony

PostPosted: Tue Nov 21, 2006 2:10 pm
by shannah
Hi Tony,

Can you post the relevant portions of your table definitions (e.g. the create table statements), and the fields.ini files so that I can take a look and try them out to track down the bugs...


One thing that occurs to me is that any field that is set NOT NULL will show up as required...

Best regards

Steve

PostPosted: Tue Nov 21, 2006 3:31 pm
by ozrebel
Thanks Steve. It was the NOT NULL.

Cheers

Tony