Re: Line feed at the befining of my pages source ?!? Where does it come from? Is beaks my XML :(

2009-03-06 Thread Aktarus

Thanks to IRC channel guys I solved the pbm:  Remove all the php
closing tags  ?>  from your code and it solved the pbm.

Thanks to the CakePHP community!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Line feed at the befining of my pages source ?!? Where does it come from? Is beaks my XML :(

2009-03-06 Thread Aktarus

Looking in forums I have found this:-

http://bytes.com/topic/xml/answers/685843-xml-version-1-0-encoding-utf-8-creting-problem-mozilla-firefox

Although **I** don't introduce the line feed they are talking about, I
presume it is inserted by CakePHP in the code, I cannot find where
with my debugger ... Can anyone help?

Thanks.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Line feed at the befining of my pages source ?!? Where does it come from? Is beaks my XML :(

2009-03-06 Thread Aktarus

Hello,

I have an Ajax that requests XML feed to one of my CakePHP action.

My action works great and returns something like:-





So far so good... with IE, because my Ajax does not work with
Mozilla!
Mozilla returns the following error message when accessing the action
that ough to return the XML directly:-

XML Parsing Error: XML or text declaration not at start of entity
Location: http://localhost/dnp/toto_trees/tree
Line Number 2, Column 1:
^

I looked in the source of this page and I can see that the page starts
with a blank line (line feed) - Mozilla complains about it, an XML
document should start immediatly with  ...

In my Controller:-

function toto() {
 $this->render( null, '/xml/default', null );
}

In my .ctp:-



In my layout:-



Thus I don't see where this line feed comes from - Can you help or
give me a workaround?

Thanks!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Model.save() works OK but cannot manage to get Model.savaAll() to work (rollback)

2009-02-09 Thread Aktarus

Hello,

I am starting with CakePHP, the latest version.
I have created 2 tables: 'users' and 'user_details' - they are
obviously related ;)

I am creating a record using Model.save(), it works OK.
I am trying to do the same with saveAll(), expecting that my user
**and** his details will be saved in the same transaction but I get a
rollback immediatly after the user record is created :-(

I am using MySQL innodb.

I don't seem to get any more details as to why I get a rollback before
the user details are stored - I am stuck.
I was expecting to get a SQL error displayed in case some "NOT NULL"
constraint or other SQL constraint was not met - I checked my code
many time.

Thanks for your help.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---