• Since the last version (1.3.5) I see many warnings in the error log of a client’s site:

    DOMDocument::loadHTML(): Tag figcaption invalid in Entity, line: 301 in /.../wp-content/plugins/pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php on line 270
    DOMDocument::loadHTML(): Tag figure invalid in Entity, line: 141 in /.../wp-content/plugins/pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php on line 270

    The lines (301 and 141) are varying and might be related to the content they handle. Line 270 in the PHP file is always the same.

    It looks like the timestamps match to requests in the access log like:

    GET /2020/09/19/random-post-title?action=genpdf&id=345
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author WP Swings

    (@wpswings)

    Hello,

    Bascially this warning generally not occur with our plugin .
    But you can check by clearing the cache and if you have any plugin related to cache then disable it and then check!

    Regards,

    Thread Starter Jos Klever

    (@josklever)

    What do you not “not with our plugin”? The error clearly mentions your plugin. At least this is not a caching issue.

    The loadHTML function is called by your plugin and the loaded content contains a figure and figcaption tags. Clearly the function doesn’t understand how to handle the content, resulting in warnings in the error log.

    From the function’s documentation I understand that it uses a HTML 4 parser that generates warnings when HTML 5 is used. You’ll need to use error handling, that’s also described in the documentation.

    https://www.php.net/manual/en/domdocument.loadhtml.php

    Plugin Author WP Swings

    (@wpswings)

    Hello@josklever
    we have check the plugin and we do agree with your concern that you have pointed out !
    It’s fixation and enhancement will be done and get implemented in the upcoming update!
    If you have any further scenario in which this issue was rising then share with us , it will really helpful to us!
    Regards,

    Thread Starter Jos Klever

    (@josklever)

    @wpswings Please don’t mark topics as resolved if they are not. I’ve just reopened it, because I’m still waiting for the update to be released. If you have a version with the fix, that needs to be tested, I’d be happy to do that.

    After releasing the update or my confirmation that the fixed version works, the topic can be marked as resolved. Not before that!

    Plugin Author WP Swings

    (@wpswings)

    Hello,

    Thank you for bringing this to our attention. We apologize for any inconvenience caused. Rest assured, we will not mark this thread as resolved until the issue is fully addressed. We are working on a fix, and it will be included in the next update.

    Regards,

    Thread Starter Jos Klever

    (@josklever)

    Any update on this? It’s still happening, so there was no fix in the latest update.

    And you marked the post as resolved again!

    Additionally I also see these lines in the log:

    PHP Warning:  DOMDocument::loadHTML(): Tag time invalid in Entity, line: 160 in /.../wp-content/plugins/pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php on line 270
    PHP Warning: DOMDocument::loadHTML(): Unexpected end tag : p in Entity, line: 137 in /.../wp-content/plugins/pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php on line 270
    PHP Warning: DOMDocument::loadHTML(): Tag summary invalid in Entity, line: 123 in /.../wp-content/plugins/pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php on line 270
    PHP Warning: DOMDocument::loadHTML(): Tag details invalid in Entity, line: 122 in /.../wp-content/plugins/pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php on line 270
    PHP Warning: DOMDocument::loadHTML(): Tag mark invalid in Entity, line: 185 in /.../wp-content/plugins/pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php on line 270
    Plugin Author WP Swings

    (@wpswings)

    Hello,

    We are updated the dompdf version and might that effect the outcome of the warning .
    We are working on it and will resolved this as updates as coming.

    Regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Warnings: Tag figure/figcaption invalid in Entity’ is closed to new replies.