Problem when 1st field in table is used in groups

Archived from the Xataface Users forum.

Jusmee — Tue Feb 02, 2010 12:26 am

I have just struggled with a problem and have narrowed it down a bit, I think. I am fairly new to xataface.

The problem was that some, or all the data was disappearing from the view form (even though it was there in the edit mode form) when I was trying to set up field groups. By trial and error, I have established that it only occurs when I place the very first field from a table, into a field group in the fields.ini file. My workaround is to add a field to the top of the table that I just ignore. Not perfect, as I still have a blank default ‘details’ group at the top in the view form, but otherwise it works.

The problem is repeatable. If I now try and add the new dummy field into a group, the same problem recurs. So it’s not related to the actual field, name, or it’s data. I also experienced the same problem on two different computers (both with the same Xataface files, but different versions of Ubuntu and probably Apache too)


shannah — Thu Feb 04, 2010 11:59 am

Interesting. What version of Xataface/PHP/MySQL are you using?


Jusmee — Thu Feb 04, 2010 11:15 pm

shannah wrote:Interesting. What version of Xataface/PHP/MySQL are you using?

xataface is 1.2.2 1616
PHP is 5.2.10-2ubuntu6.4
mysql is MySQL 5.1.37-1ubuntu5


shannah — Fri Feb 05, 2010 10:14 am

I’m having trouble reproducing the problem. Can you give me a minimal test case that I can try out on my server?


Jusmee — Fri Feb 05, 2010 2:44 pm

shannah wrote:I’m having trouble reproducing the problem. Can you give me a minimal test case that I can try out on my server?

OK, I will try. Sorry, I didn’t think of doing that already. I will get back to you.


Jusmee — Fri Feb 05, 2010 9:59 pm

OK, I created a new database with a single table as follows

Code: Select all
first     int(11    second    text    latin1_swedish_ci           third    text    latin1_swedish_ci           fourth    date           fifth     int(11)

Set it up in xataface with the following fields.ini

Code: Select all
`[fieldgroup:Main]
   label=”Main Info”
   order=1

[fieldgroup:moredetails]
   label=”moredetails”
   order=2

[first]
group=main

[second]
group=main

[third]
group=moredetails

[fourth]
group=moredetails

[fifth]
group=moredetails`

The result is that nothing shows up in the view tab, but the edit tab looks as you would expect with the correct groupings.

No, add one semicolon to the first field definition in the fields .ini, i.e.

Code: Select all
[first] ;group=main

and the view tab populates, as below

Code: Select all
`Details
First    1

Main
Second    d1

Moredetails
Third    dd1
Fourth    2010-02-06
Fifth    1`


shannah — Mon Feb 08, 2010 3:02 pm

Thanks. This is now fixed in SVN.
http://weblite.ca/svn/dataface/core/tru … rdView.php


Jusmee — Tue Feb 09, 2010 12:31 am

shannah wrote:Thanks. This is now fixed in SVN.
http://weblite.ca/svn/dataface/core/tru … rdView.php

Works perfectly. thanks so much for the prompt fix.