• Resolved Charlie Laubin

    (@charlie45100)


    Hello,

    I am contacting you, because my monitoring software returns me numerous PHP errors coming from the plugin.

    Example :
    1310 different messages exist for this same error. We show you a maximum of 5 of them to see the type of redundancy.

    DOMDocument::loadHTML(): Tag path invalid in Entity, line: 136
    DOMDocument::loadHTML(): Tag path invalid in Entity, line: 149
    DOMDocument::loadHTML(): Tag path invalid in Entity, line: 58
    DOMDocument::loadHTML(): Tag figure invalid in Entity, line: 287
    DOMDocument::loadHTML(): Tag figure invalid in Entity, line: 18

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WPJoli

    (@wpjoli)

    Hi,

    Thank you for reaching out.

    Could you give more details about this output ?

    1) What monitoring software are you using ?

    2) What log file does it come from ? do you get anything in the WordPress debug.log file if you activate it ?

    3) Are these errors or warnings ?

    4) Are you using PHP 7.X or PHP 8 ?

    Most likely these are just warnings so nothing to worry about if your page loads and everything look find but I will try to make sure these do not show up in the log files in the future.

    Thank you!

    Thread Starter Charlie Laubin

    (@charlie45100)

    Hello,

    1) The monitoring tool I use is WP Umbrella (https://wp-umbrella.com/)

    2) I could not say in which file this is referenced, however I know that it comes from the following files according to WP Umbrella:
    ‘File Error: joli-table-of-contents / core / Controllers / PublicAppController.php (Line: 145)
    File Error: joli-table-of-contents / core / Controllers / PublicAppController.php (Line: 123)’

    Screenshot: https://cdn.discordapp.com/attachments/832760440395792386/877604193668571156/Screenshot_1.jpg

    3) This returns me this as an error type on WP Umbrella “Error Type: E_WARNING (2)”, so it corresponds a priori to warnings.

    4) I am using version 7.4 and in particular version 7.4.21 and 7.4.22

    Plugin Author WPJoli

    (@wpjoli)

    Hi,

    Thank you for your answers,

    According to what I can see, the warnings come from the PHP DOMDocument module which is used in Joli Table Of Contents for parsing the HTML and figure out where the headings are.

    These warnings show up because of either malformed HTML or because of HTML5 markups being present, which cause this particuliar library to trigger warnings if not provided with a DTD to validate the special HTML5 markup (such as “figure” or “path”).

    Here is a more detailed explanation:
    https://stackoverflow.com/questions/9149180/domdocumentloadhtml-error

    And here is the official php explanation of why it can trigger warnings:
    https://www.php.net/manual/en/domdocument.loadhtml.php#refsect1-domdocument.loadhtml-errors

    While malformed HTML should load successfully, this function may generate E_WARNING errors when it encounters bad markup.

    Normally, the plugin’s code is designed to hide these warnings from the log file (when activated). Check WP_DEBUG for more details. However your tool (WP Umbrella) may still pick up on these warnings despite being hidden by default.

    So while this should not be a big deal, I understand this is a tad annoying to see that show up. I will see what I can do to better deal with these warnings in a future update.

    I hope this helped,

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error PHP’ is closed to new replies.