• gaet

    (@gaet)


    Hi,
    I’ve some php errors detected by Query Monitor plugin.
    Errors are :

    DOMDocument::loadHTML(): Tag header invalid in Entity
    DOMDocument::loadHTML(): Tag nav invalid in Entity
    DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity
    
    wp-content/plugins/email-encoder-bundle/core/includes/classes/class-email-encoder-bundle-validate.php:409

    Can you tell me how to fix it ?

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • pycroy

    (@pycroy)

    Same here get errors :

    E_WARNING: DOMDocument::loadHTML(): Unexpected end tag : transition in Entity, line: 1906 in /wp-content/plugins/email-encoder-bundle/core/includes/classes/class-email-encoder-bundle-validate.php on line 409

    Same here my log file full of this

    E_WARNING: DOMDocument::loadHTML(): Unexpected end tag : div in Entity, line: 2034 in /wp-content/plugins/email-encoder-bundle/core/includes/classes/class-email-encoder-bundle-validate.php on line 409

    /email-encoder-bundle/core/includes/classes/class-email-encoder-bundle-validate.php

    When I load an HTML5 page, I get a php error on line 409.

    @$dom->loadHTML($content);

    You should be able to suppress errors with libxml_use_internal_errors and libxml_clear_errors before and after loadHTML.

    Here is a page written in Japanese, but it is helpful.

    https://tabiji.gallery/development/5311

    Did this ever get fixed?

    Not for me…

    Yeah, I see dozens of errors on every page loading. I wonder if it’s conflicting with Query Monitor?

    I rewrote class-email-encoder-bundle-validate.php and no more errors.
    I am not sure if the Query Monitor is the cause.

    line408-409

                $dom = new DOMDocument();
    @$dom->loadHTML($content);
                $dom = new DOMDocument();
    $internalErrors = libxml_use_internal_errors(true);
    @$dom->loadHTML($content);

    line440-442

                }
    
                //Keep for now
                                }
    libxml_use_internal_errors($internalErrors);
    libxml_clear_errors();

    //Keep for now

    @ironikus What do you think of the above patch? ??

    @thamrin0 for me working great ! Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Php errors (DOMDocument::loadHTML())’ is closed to new replies.