Undefined index, invalid arguments, etc after 1.2.6 upgrade

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

Undefined index, invalid arguments, etc after 1.2.6 upgrade

Postby goxatago » Thu Oct 28, 2010 5:02 am

Hello everyone.

After upgrading to version 1.2.6 from 1.2.5 I have encountered the following errors in my http error log while in edit mode of child tables. Actually I do not get to be in edit mode as I receive a blank form.
These errors do not occur in version 1.2.5 and no changes have been made in the config files.
The errors appear only in edit mode of child tables. They do not appear in the edit mode of the parent table of the relationship.

The setup is Red Hat, PHP 5.1.6, mysql 5.0.77. Tried both Chrome and Firefox on Mac. The errors are the following:


Code: Select all
PHP Notice:  Undefined index:  column_names in /var/www/html/xataface/SQL/Parser/wrapper.php on line 649, referer: http://my_host_name.gom/my_db/index.php?-table=titles&-action=browse&-cursor=0&-skip=0&-limit=30&-mode=list&-recordid=titles%3Ftitle_id%3D1

PHP Notice:  Undefined index:  column_names in /var/www/html/xataface/Dataface/Relationship.php on line 244, referer: http://my_host_name/my_db/index.php?-table=titles&-action=browse&-cursor=0&-skip=0&-limit=30&-mode=list&-recordid=titles%3Ftitle_id%3D1

PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/xataface/Dataface/Relationship.php on line 251, referer: http://my_host_name/my_db/index.php?-table=titles&-action=browse&-cursor=0&-skip=0&-limit=30&-mode=list&-recordid=titles%3Ftitle_id%3D1

PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/xataface/SQL/Parser/wrapper.php on line 589, referer: http://my_host_name/my_db/index.php?-table=titles&-action=browse&-cursor=0&-skip=0&-limit=30&-mode=list&-recordid=titles%3Ftitle_id%3D1

PHP Fatal error:  In Dataface_Table::loadTable() expected first argument to be a string but received ''On line 2343 of file /var/www/html/xataface/Dataface/Table.php in function printStackTrace()\n<br>On line 45 of file /var/www/html/xataface/Dataface/FormTool/select.php in function loadTable()\n<br>On line 393 of file /var/www/html/xataface/Dataface/FormTool.php in function buildWidget(Dataface_Record Object,array(agro_id,int(10),NO,,,,titles,array(\xce\x9a\xcf\x89\xce\xb4\xce\xb9\xce\xba\xcf\x8c\xcf\x82 \xce\xa0\xce\xb1\xcf\x81\xce\xb1\xce\xb3\xcf\x89\xce\xb3\xce\xbf\xcf\x8d,\xce\x95\xce\xb9\xcf\x83\xce\xb1\xce\xb3\xce\xb5\xcf\x84\xce\xb5 \xcf\x84\xce\xbf\xce\xbd \xce,Dataface_QuickForm Object,agro_id,)\n<br>On line 345 of file /var/www/html/xataface/Dataface/QuickForm.php in function buildWidget(Dataface_Record Object,array(agro_id,int(10),NO,,,,titles,array(\xce\x9a\xcf\x89\xce\xb4\xce\xb9\xce\xba\xcf\x8c\xcf\x82 \xce\xa0\xce\xb1\xcf\x81\xce\xb1\xce\xb3\xcf\x89\xce\xb3\xce\xbf\xcf\x8d,\xce\x95\xce\xb9\xcf\x83\xce\xb1\xce\xb3\xce\xb5\xcf\x84\xce\xb5 \xcf\x84\xce\xbf\xce\xbd \xce,Dataface_QuickForm Object,agro_id,,array(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1))\n<br>On line 486 of file /var/www/html/xataface/Dataface/QuickForm.php in function _buildWidget(array(agro_id,int(10),NO,,,,titles,array(\xce\x9a\xcf in /var/www/html/xataface/Dataface/Table.php on line 2343, referer: http://my_host_name/my_db/index.php?-table=titles&-action=browse&-cursor=0&-skip=0&-limit=30&-mode=list&-recordid=titles%3Ftitle_id%3D1


If I revert back to version 1.2.5 the errors do not occur.
The same error occurs with 2 different xataface apps always while in edit mode.

Has anyone else experienced something similar ?

Thank you,

S.
goxatago
 
Posts: 14
Joined: Fri Jul 09, 2010 2:08 am

Re: Fixed:Undefined index, invalid arguments,after 1.2.6 upgrade

Postby goxatago » Thu Oct 28, 2010 8:52 am

Hello again,

It seems the problem was in the valuelists.ini file(s) of the child tables of the relationship, although I am not sure I understand the reason.

The contents of the original valuelists.ini was

[pick_list]
__sql__="select concat(field1,'-',field2,'-',field3) from table order by field1"

It executes fine from the mysql console and runs w/o problems in xataface 1.2.5

I modified it to

[pick_list]
__sql__="select field1,concat(field2,'-',field3) from table order by field1"

and it works in version 1.2.6

Perhaps if Steve has a few minutes, he can provide the reason for this..

Still - all is well now, thank you for the upgrade :-)

S.
goxatago
 
Posts: 14
Joined: Fri Jul 09, 2010 2:08 am

Re: Undefined index, invalid arguments, etc after 1.2.6 upgrade

Postby amrcode1 » Thu Oct 28, 2010 9:08 am

Yes, i have exactly the same problem, i just updated xataface today, my end users call me for report this bug, i have to come back to previuos version of xataface.

Warning: Invalid argument supplied for foreach() in /var/www/private/xataface/Dataface/Relationship.php on line 251

Warning: Invalid argument supplied for foreach() in /var/www/private/xataface/SQL/Parser/wrapper.php on line 589

Fatal error: In Dataface_Table::loadTable() expected first argument to be a string but received ''On line 2343 of file /var/www/private/xataface/Dataface/Table.php in function printStackTrace()
On line 45 of file /var/www/private/xataface/Dataface/FormTool/select.php in function loadTable()
On line 393 of file /var/www/private/xataface/Dataface/FormTool.php in function buildWidget(Dataface_Record Object,array(phlebotomist,varchar(255),YES,,,,Sample_collection,array(Phlebotomist,,Sample_collection.phleb,Dataface_QuickForm Object,phlebotomist,1)
On line 345 of file /var/www/private/xataface/Dataface/QuickForm.php in function buildWidget(Dataface_Record Object,array(phlebotomist,varchar(255),YES,,,,Sample_collection,array(Phlebotomist,,Sample_collection.phleb,Dataface_QuickForm Object,phlebotomist,1,array(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1))
On line 335 of file /var/www/private/xataface/Dataface/ShortRelatedRecordForm.php in function _buildWidget(array(ph in /var/www/private/xataface/Dataface/Table.php on line 2343

my valuelist is:
[phlebotomists]
__sql__ = "select concat(firstname,' ',lastname) from r_Personnel where title like '%Enfer%' or title like '%Invest%' or title like '%Supervi%' order by firstname asc"

i think the cause is in the change on sql parser of xataface or something like that...
amrcode1
 
Posts: 18
Joined: Thu Nov 12, 2009 11:09 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 15 guests

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