symfony 1.4 - renderComponent() and ajax problem

Showing 1-2 of 2 messages
symfony 1.4 - renderComponent() and ajax problem vviippola 6/22/11 12:15 PM
Hi ppl,

I'm going crazy with this issue, probably something trivial I'm not
able to figure out.

I have a component which works fine when included on template using
include_component()

However, when I do this for ajax calls I'm getting an error.

if ($request->isXmlHttpRequest())
{
    return $this->renderComponent("product_comment", "showComment",
array('comment' => $product_comment, 'class' => "hidden"));
}

error_log: The template "Success.php" does not exist or is unreadable
in ""

Serious debugging has taken place, but I'm just not able to figure
this out...
Re: symfony 1.4 - renderComponent() and ajax problem Imran 6/23/11 1:01 AM
Hi there,

Just replace the line:

return $this->renderComponent("product_comment", "showComment",
array('comment' => $product_comment, 'class' => "hidden"));

with:

$text =  $this->getComponent("product_comment", "showComment",
array('comment' => $product_comment, 'class' => "hidden"));


return $this->renderText($text);


Cheers!

-Imran