How to debug failed save?

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

How to debug failed save?

Postby kedoin » Fri Apr 04, 2008 7:58 am

Hello. I'm a new user to Xataface. I'm currently using version 0.7.1 and I'm running into a problem where I try to add a new record and the save fails silently without any error messages. I would like to know how best to find the problem (e.g, is there a way to turn on logging of SQL statements? is there a place where failed SQL statements are written?)

More specifically, I have a DB which has tables 'people' and 'email_addresses'. I can create new email_addresses fine when I navigate to the "email_addresses" "folder" in the navigation bar and click "new record". This saves successfully!

However, I have setup relationships.ini in people as:
Code: Select all
[Email Addresses]
email_addresses.person_id = "$id"


And when I navigate to the "folder" for "people" and select a person, I see an "email addresses" tab. (Good, so far) But, when I select the "email addresses" tab and click on "add new email addresses record" when I click "save" I don't get a message the save was successful and it seems to fail silently.

I thought that something might be wrong with the relationship so I added the following to relationships.ini in email_addresses:
Code: Select all
[People]
people.id = "$person_id"

but that didn't seem to help.

Any help would be appreciated.
-Rob
kedoin
 
Posts: 12
Joined: Fri Apr 04, 2008 7:44 am

immediate problem fixed

Postby kedoin » Fri Apr 04, 2008 8:37 am

Hi!

I fixed my immediate problem. I can now save my email_addresses. It turns out that I had changed the capitalization of the words in my section names of my relationship.ini files. In doing so, that broke things.

(I figured this out when I tried to use the 1.0beta2 and it through a bunch of fits about my relationships.)

Now that everything is named the same with case and underscores, I can save my email_addresses.

I would still like to know what the generic debugging techniques for Xataface are though.
-Rob
kedoin
 
Posts: 12
Joined: Fri Apr 04, 2008 7:44 am

Postby shannah » Tue Apr 08, 2008 8:23 am

Hi,

Glad to hear that you got it working. There isn't any built-in SQL logging for Xataface, however, if you're getting silent errors, it probably isn't an SQL problem.

The first thing I usually do is check the apache error log to see if it will tell me what error occurred. It should at least give me a line where things failed.

From there I can add my own debugging code to find out where things went wrong..

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


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 15 guests

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