Cannot modify header information - headers already sent

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

Cannot modify header information - headers already sent

Postby jesteve » Fri Apr 03, 2009 2:46 am

Hi,

I have a problem when using delegate class with relationships. More precisely:

1) I define the following delegate class "Orders.php" to change the rendering of one field for the "Orders" table:

class tables_Orders {
function Attachment__renderCell( &$record ){
$attachment = $record->strval('Attachment');
if ($attachment) {
return $attachment;
} else {
return "no";
}
}
}


2) I define a relationship between the "Orders" table and the "Buyers" table using the following "relationships.ini" in the Buyers'directory:

[Orders]
Orders.Buyer_Id = "$Buyer_Id"
actions:addexisting = 0
actions:addnew = 0
action:label = "My orders"

3) Creating a new buyer record leads to the "headers already sent" error:

PHP Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/ACOD/tables/Orders/Orders.php:1) in /Applications/MAMP/htdocs/xataface/actions/new.php on line 159

How can I go around that ?

Many thanks in advance, Jerome.
jesteve
 
Posts: 2
Joined: Fri Apr 03, 2009 2:31 am

Bug is solved...

Postby jesteve » Fri Apr 03, 2009 8:05 am

The bug was due to a file encoding problem which inserted an extra hidden character at the begining of the delegate class file.

For the newbies like me, use "Unicode (no BOM)" instead of "Unicode".

Sorry for that and many thanks for this nice framework...


Jerome.
jesteve
 
Posts: 2
Joined: Fri Apr 03, 2009 2:31 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 11 guests

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