Re: setFlash() appending a 1
the problem: you echo too much (twice) remove the echo in front of your method it is a void function - at least in 1.2 since cakephp 1.3 it actually returns the value and therefore needs the echo in front of it! On 7 Jan., 06:44, Jeremy Burns jeremybu...@me.com wrote: How are you setting and displaying the flash value? Consider both an instruction, so if you do something like if($this-Session-flash()); you'll get both the message and a 1 to indicate success. To set the value, use $this-Session-setFlash();. To display it, use $this- Session-flash();. On Jan 7, 5:40 am, Kerr hayl...@gmail.com wrote: Hi all, I'm experiencing a really weird issue where the $session-setFlash() method appends a single 1 character directly after the generated div tag. I'm using an unmolested copy of CakePHP 1.2.5. I've looked all through the source in SessionComponent, CakeSession and SessionHelper and don't see anywhere where this could be happening. Has anyone else experienced a similar issue? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: setFlash() appending a 1
Thanks for the prompt replies, guys! I am using $this-Session- setFlash() in my controller after a successful form submission, then redirecting, where I echo $session-flash(). I removed the echo, and all is good! I can't believe I hadn't thought of that before, as I spent an inordinate amount of time banging my head against the wall. Hah, I guess I'll have to keep the echo in mind when migrating to 1.3! I'm only using $session-flash() in a single place in default.ctp, so no big issue there. CakePHP rawks! On Jan 7, 2:09 am, euromark dereurom...@googlemail.com wrote: the problem: you echo too much (twice) remove the echo in front of your method it is a void function - at least in 1.2 since cakephp 1.3 it actually returns the value and therefore needs the echo in front of it! On 7 Jan., 06:44, Jeremy Burns jeremybu...@me.com wrote: How are you setting and displaying the flash value? Consider both an instruction, so if you do something like if($this-Session-flash()); you'll get both the message and a 1 to indicate success. To set the value, use $this-Session-setFlash();. To display it, use $this- Session-flash();. On Jan 7, 5:40 am, Kerr hayl...@gmail.com wrote: Hi all, I'm experiencing a really weird issue where the $session-setFlash() method appends a single 1 character directly after the generated div tag. I'm using an unmolested copy of CakePHP 1.2.5. I've looked all through the source in SessionComponent, CakeSession and SessionHelper and don't see anywhere where this could be happening. Has anyone else experienced a similar issue? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: setFlash() appending a 1
well, its always a good idea to jump into the section in the cake core file before you bang your head to any solid objects in the room :) On 7 Jan., 14:40, Kerr hayl...@gmail.com wrote: Thanks for the prompt replies, guys! I am using $this-Session-setFlash() in my controller after a successful form submission, then redirecting, where I echo $session-flash(). I removed the echo, and all is good! I can't believe I hadn't thought of that before, as I spent an inordinate amount of time banging my head against the wall. Hah, I guess I'll have to keep the echo in mind when migrating to 1.3! I'm only using $session-flash() in a single place in default.ctp, so no big issue there. CakePHP rawks! On Jan 7, 2:09 am, euromark dereurom...@googlemail.com wrote: the problem: you echo too much (twice) remove the echo in front of your method it is a void function - at least in 1.2 since cakephp 1.3 it actually returns the value and therefore needs the echo in front of it! On 7 Jan., 06:44, Jeremy Burns jeremybu...@me.com wrote: How are you setting and displaying the flash value? Consider both an instruction, so if you do something like if($this-Session-flash()); you'll get both the message and a 1 to indicate success. To set the value, use $this-Session-setFlash();. To display it, use $this- Session-flash();. On Jan 7, 5:40 am, Kerr hayl...@gmail.com wrote: Hi all, I'm experiencing a really weird issue where the $session-setFlash() method appends a single 1 character directly after the generated div tag. I'm using an unmolested copy of CakePHP 1.2.5. I've looked all through the source in SessionComponent, CakeSession and SessionHelper and don't see anywhere where this could be happening. Has anyone else experienced a similar issue? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: setFlash() appending a 1
Use this $session-flash(); instead of echo $session-flash(); Thanks Dilip Bakotiya On Thu, Jan 7, 2010 at 11:14 AM, Jeremy Burns jeremybu...@me.com wrote: How are you setting and displaying the flash value? Consider both an instruction, so if you do something like if($this-Session-flash()); you'll get both the message and a 1 to indicate success. To set the value, use $this-Session-setFlash();. To display it, use $this- Session-flash();. On Jan 7, 5:40 am, Kerr hayl...@gmail.com wrote: Hi all, I'm experiencing a really weird issue where the $session-setFlash() method appends a single 1 character directly after the generated div tag. I'm using an unmolested copy of CakePHP 1.2.5. I've looked all through the source in SessionComponent, CakeSession and SessionHelper and don't see anywhere where this could be happening. Has anyone else experienced a similar issue? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: setFlash() appending a 1
euromark -- I had done that, but for some reason had totally blanked on the issue. It was likely due to the fact that I'd been up for 20 hours coding. :/ On Jan 7, 7:52 am, euromark dereurom...@googlemail.com wrote: well, its always a good idea to jump into the section in the cake core file before you bang your head to any solid objects in the room :) On 7 Jan., 14:40, Kerr hayl...@gmail.com wrote: Thanks for the prompt replies, guys! I am using $this-Session-setFlash() in my controller after a successful form submission, then redirecting, where I echo $session-flash(). I removed the echo, and all is good! I can't believe I hadn't thought of that before, as I spent an inordinate amount of time banging my head against the wall. Hah, I guess I'll have to keep the echo in mind when migrating to 1.3! I'm only using $session-flash() in a single place in default.ctp, so no big issue there. CakePHP rawks! On Jan 7, 2:09 am, euromark dereurom...@googlemail.com wrote: the problem: you echo too much (twice) remove the echo in front of your method it is a void function - at least in 1.2 since cakephp 1.3 it actually returns the value and therefore needs the echo in front of it! On 7 Jan., 06:44, Jeremy Burns jeremybu...@me.com wrote: How are you setting and displaying the flash value? Consider both an instruction, so if you do something like if($this-Session-flash()); you'll get both the message and a 1 to indicate success. To set the value, use $this-Session-setFlash();. To display it, use $this- Session-flash();. On Jan 7, 5:40 am, Kerr hayl...@gmail.com wrote: Hi all, I'm experiencing a really weird issue where the $session-setFlash() method appends a single 1 character directly after the generated div tag. I'm using an unmolested copy of CakePHP 1.2.5. I've looked all through the source in SessionComponent, CakeSession and SessionHelper and don't see anywhere where this could be happening. Has anyone else experienced a similar issue? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
setFlash() appending a 1
Hi all, I'm experiencing a really weird issue where the $session- setFlash() method appends a single 1 character directly after the generated div tag. I'm using an unmolested copy of CakePHP 1.2.5. I've looked all through the source in SessionComponent, CakeSession and SessionHelper and don't see anywhere where this could be happening. Has anyone else experienced a similar issue? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: setFlash() appending a 1
How are you setting and displaying the flash value? Consider both an instruction, so if you do something like if($this-Session-flash()); you'll get both the message and a 1 to indicate success. To set the value, use $this-Session-setFlash();. To display it, use $this- Session-flash();. On Jan 7, 5:40 am, Kerr hayl...@gmail.com wrote: Hi all, I'm experiencing a really weird issue where the $session-setFlash() method appends a single 1 character directly after the generated div tag. I'm using an unmolested copy of CakePHP 1.2.5. I've looked all through the source in SessionComponent, CakeSession and SessionHelper and don't see anywhere where this could be happening. Has anyone else experienced a similar issue? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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