Clive Portman: code

Craft CMS PDF Printmaker plugin warning/error: ID content already defined

There's an issue with DOMPDF on some versions of PHP where documents requiring more than one page throw the following warning if you're running within devMode:

DOMNode::cloneNode(): ID content already defined

It's an issue with DOMPDF ( caused by an element with an ID attribute and that element extending over more than one page. In my case, I was using:

<main id="content" role="main">
 {% block content %}{% endblock %}

Simply removing id="content" was enough for the warning to disappear. Or you could just turn off devMode if it isn't a breaking error.