Problem when 1st field in table is used in groups

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

Problem when 1st field in table is used in groups

Postby 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)
Jusmee
 
Posts: 22
Joined: Mon Feb 01, 2010 5:11 pm

Re: Problem when 1st field in table is used in groups

Postby shannah » Thu Feb 04, 2010 11:59 am

Interesting. What version of Xataface/PHP/MySQL are you using?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Problem when 1st field in table is used in groups

Postby 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
Jusmee
 
Posts: 22
Joined: Mon Feb 01, 2010 5:11 pm

Re: Problem when 1st field in table is used in groups

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

Re: Problem when 1st field in table is used in groups

Postby 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
 
Posts: 22
Joined: Mon Feb 01, 2010 5:11 pm

Re: Problem when 1st field in table is used in groups

Postby 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
Jusmee
 
Posts: 22
Joined: Mon Feb 01, 2010 5:11 pm

Re: Problem when 1st field in table is used in groups

Postby shannah » Mon Feb 08, 2010 3:02 pm

shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Problem when 1st field in table is used in groups

Postby 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.
Jusmee
 
Posts: 22
Joined: Mon Feb 01, 2010 5:11 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 19 guests

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