tak, tak wszystko sie zgadza ...ale teoretycznie
w szablonie artykulu mam:
include_component
('comment', 'form', array('comment_form' => isset($comment_form) ?
$comment_form : null)
ktory wyswietla formularz kierujacy do akcji comment/add.
W akcji comment/add mam:
if($request->isMethod(sfRequest::POST))
{
$this->comment_form = new ContentCommentForm();
$formValues = $request->getParameter('catalog_comment');
$this->comment_form->bind(array_merge($formValues, array('captcha' => $formValues['captcha'])));
if ($this->comment_form->isValid())
{
$this->comment_form->save();
}
else
{
$referer = str_replace($request->getScriptName(), '', $formValues['referer']); $params = $this->getContext()->getRouting()->parse($referer);
unset($params['_sf_route']); $url_params = $this->getContext()->getController()->convertUrlStringToParameters($referer);
foreach ($params as $param => $value)
{
$request->setParameter($param, $value);
}
$this->forward($params['module'], $params['action'], array('comment_form' => 'ffff')); }
}
no i teraz, jak wypelnie formularz poprawnie to dokona sie zapis do bazy, ale jesli zrobie blad to po odswiezeniu strony nie robi sie repopulacja formularza.
Czyli w momencie forwardu do akcji artykulu nie mam dostepu do zmiennej $this->comment_form
Czy cos robie zle ?