Support » Plugin: WooCommerce PDF Invoices & Packing Slips » “No block-level parent found. Not good” Error

  • Resolved soldier99



    After upgrading to the latest version i have either blank page or error “No block-level parent found. Not good”

    Debug output shows this:

    Fatal error: Uncaught exception ‘Dompdf\Exception’ with message ‘No block-level parent found. Not good.’ in /public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Positioner/Inline.php:45 Stack trace: #0 /public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(872): Dompdf\Positioner\Inline->position(Object(Dompdf\FrameDecorator\Text)) #1 /public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameReflower/Text.php(368): Dompdf\FrameDecorator\AbstractFrameDecorator->position() #2 /public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(893): Dompdf\FrameReflower\Text->reflow(NULL) #3 /public_html/wp-content/plugins in /public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Positioner/Inline.php on line 45

    What i have tried so far:
    1. Deactivated all plugins except Woocommerce and PDF Incvoices and packing slips.
    2. Switched to Twenty twelve theme
    3. Reinstalled fonts
    4. Removed temporary files
    5. Deleted legacy 1x settings
    6. Deleted plugin and then reinstalled it

    Nothing above worked.

    WP memory is 128M and no orange or red flags are shown. We use only Simple template and we have not midified it.

    Please advise how to fix this issue.


    • This topic was modified 11 months ago by  soldier99.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Ewout


    Hi! Thanks for reporting. This is a known issue in dompdf, related to a recent libxml update. More information here:

    You can fix this by adding a small code snippet to your site:

    add_filter( 'wpo_wcpdf_dompdf_options', 'wpo_wcpdf_dompdf_options_custom', 10, 1 );
    function wpo_wcpdf_dompdf_options_custom($options) {
    	$options['isHtml5ParserEnabled'] = true;
    	return $options;

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters.
    This requires today’s release of the PDF Invoice plugin (2.0.10)

    I will look into enabling this by default.




    Thank you for your quick reply. At first it did not work. Then i deleted the plugin and reinstalled and then it solved the problem.

    Thanks again.

    Delete this. I don’t see the delete button.

    There is a big problem, the plugin is not working anymore…
    Can somebody help him?

    The solution mentioned above is not working!


    It’s a whitespace, told me.

    Plugin Author Ewout


    Hello Vincent,
    The solution from the github post above (to which I also linked in my reply here) is exactly what the filter accomplishes, it switches to the HTML5 parser to avoid the whitespace issue (whitespace causes the error but is itself the result of the parser used).
    This filter ONLY works with version 2.0.10 (or higher).


    I have still have this problem. I even added the fitler, but still the same error. any idea’s? I am using version 2.0.13.

    Plugin Author Ewout


    Hi! This filter is NOT required anymore, as version 2.0.11 or later (including current 2.0.13) enables the HTML5 parser by default (you can disable it via WooCommerce > PDF Invoices > Status, setting “Use DOMDocument to parse HTML”. What is the exact PHP error you’re getting?

    This is the state of WooCommerce > PDF Invoices > Status:
    The error i get is “No block-level parent found. Not good.” where can i get the exact php error? i checked “Use DOMDocument to parse HTML”.

    Plugin Author Ewout


    I see, if you’re getting “No block-level parent found. Not good.”, you should uncheck the “Use DOMDocument to parse HTML”. That should prevent the “No block-level parent found. Not good.” error from happening.

    I still get the error. . “Op factuur” means on invoice.

    Plugin Author Ewout


    That is very strange – as far as I know this error only happens with the DOMDocument parser (in combination with a specific version of a php library: libxml 2.9.5 or later). I have seen reports where people had this issue even with the HTML5parser, but only with dompdf 0.8.1 and I still use 0.8.0 (for exactly this reason). Do you use any other plugins that create PDF documents that may be using dompdf?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘“No block-level parent found. Not good” Error’ is closed to new replies.