Uncaught exception 'DOMPDF_Exception' with message 'No block-level parent found. - Version 0.8.2/php 5.6.33

1,529 views
Skip to first unread message

Mark Fischer

unread,
Jan 19, 2018, 4:49:10 PM1/19/18
to dompdf
Last night my centos server updated to php 5.6.33 and dompdf started throwing the following error.  I updated to version 0.8.2 and get the same error.  I used dompdf on a known good file, it worked fine yesterday before the php update, and I got the same error.  I have searched the issues on github.  Any ideas?


PHP Fatal error:  Uncaught exception 'DOMPDF_Exception' with message 'No block-level parent found.  Not good.' in /home/.../dompdf/include/inline_positioner.cls.php:38
Stack trace:
#0 /home/..../dompdf/include/frame_decorator.cls.php(546): Inline_Positioner->position()
#1 /home/..../dompdf/include/text_frame_reflower.cls.php(331): Frame_Decorator->position()
#2 /home/..../dompdf/include/frame_decorator.cls.php(556): Text_Frame_Reflower->reflow(NULL)
#3 /home/..../dompdf/include/page_frame_reflower.cls.php(138): Frame_Decorator->reflow()
#4 /home/..../dompdf/include/frame_decorator.cls.php(556): Page_Frame_Reflower->reflow(NULL)
#5 /home/..../dompdf/include/dompdf.cls.php(817): Frame_Decorator->reflow()
#6 /home/..../dompdf/dompdf.php(257): DOMPDF->render()
#7 {main}
  thrown in /home/..../dompdf/include/inline_positioner.cls.php on line 38

Priyank Khunt

unread,
Jan 23, 2018, 2:49:51 PM1/23/18
to dom...@googlegroups.com
I got the exactly same issue as like you that the centos server updated on 17 Jan, 2018.
From that day old version of dompdf was retrieving the same error 'No block-level parent found.  Not good.'

But this is issue is solved in dompdf version 0.8.2.
After long research I got the solution that the extension 'mbstring' should be enable from hosting server.

It was working for me.
Please double check your new updated version and instance that you created, where the older version class name was 'DOMPDF' and the latest version class name is 'Dompdf'.

I hope it may help you.

--
You received this message because you are subscribed to the Google Groups "dompdf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dompdf+unsubscribe@googlegroups.com.
To post to this group, send email to dom...@googlegroups.com.
Visit this group at https://groups.google.com/group/dompdf.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards
Priyank Khunt

BrianS

unread,
Feb 3, 2018, 12:30:58 PM2/3/18
to dompdf
The most common cause seems to be white space outside the HTML document body. Can you post a sample of your HTML?

Vlad D

unread,
Aug 10, 2020, 10:53:35 PM8/10/20
to dompdf
i tried to locate the white space but it was hard
so i just minimized the html template for PDF 
and it removed all the characters that are not important
worked for me
Reply all
Reply to author
Forward
0 new messages