1

At my work we have a very old symfony app (developed by the guy who have my position before the guy I came to replace), and today a customer call to us saying that a "print this article" functionality doesn't work in Chrome. The functionality is simple: it opens the Browsers "Print dialog" and let you print the article. The action works in every browser except in Chrome (it works even in Safari) When I click the url in Chrome, it opens a new windows and inmediatily closed it. I don't have a clue of what could happen because I never have program a symfony app before.

This is the code I found:

public function executeImprimir(sfWebRequest $request) {
   $this->forward404Unless($this->articulo = ArticuloPeer::retrieveByPk($request->getParameter('id')), sprintf('Object articulo does not exist (%s).', $request->getParameter('id')));
    $c = new Criteria();
    $c->add(ArticuloContPeer::ARTICULO_ID, $request->getParameter('id'));
    $aux = ArticuloContPeer::doSelect($c);
    $this->contenido = $aux[0];
    $this->setLayout(false); 
}

}

Any clue? could someone help me? could someone guide me in the correct path to track the problem?

Thanks in advance

Nisanio
  • 4,056
  • 5
  • 34
  • 46
  • 1
    See if you can find corresponding code in `../templates/imprimirSuccess.php`. That's (probably) the template that will be being rendered assuming this execute call is successful, and might give you more of a clue about what's going on. Also, verify that printing works at all in Chrome (using Ctrl-P to print) -- some builds have had problems. – Matt Gibson Jan 17 '11 at 15:31
  • 1
    What happens in the template (imprimirSuccess.php)? The code from the action you shared should have no impact on how Chrome deals with the page. – Tomas Kohl Jan 17 '11 at 15:41

0 Answers0