Friday, September 16, 2011

Err: Call to a member function get_cellmap() on a non-object by sfDomPDFPlugin in Symfony


Error:
PHP Fatal error:  Call to a member function get_cellmap() on a non-object in /var/www/pdftest/plugins/sfDomPDFPlugin/lib/dompdf/include/table_cell_frame_reflower.cls.php on line 64, referer: http://localhost/pdftest/dc/printlist

Reason:
DomPDF throws this error when any HTML tag error found in the content supplied. (ie. Any  unclosed tag or closed tag without open tag).

Solution:
Make sure the HTML content to be supplied that not contains any missing or unwanted tags.

For example, in the following code, error parts which are all highlighted will throws this errors mentioned.

<html>
<table>
 <tr>
   <td>
        </table>
   </td>
 </tr>
<tr>
   <td>...</td>

</table>
</html>


3 comments:

  1. Thanks, this article has helped me!

    ReplyDelete
  2. Very usefull ! saved me a LOT of searching.

    ReplyDelete