• Resolved Yan

    (@donamyk)


    HTML5-PHP parser fails if staatic_extended_url_context is set

    ## Log Message:

    Error: Object of class DOMElement could not be converted to string in /Users/apple/Local Sites/mysite/app/public/wp-content/plugins/staatic/vendor/staatic/crawler/src/UrlExtractor/HtmlUrlExtractor.php:187
    Stack trace:
    #0 /Users/apple/Local Sites/aibms/app/public/wp-content/plugins/staatic/vendor/staatic/crawler/src/UrlExtractor/HtmlUrlExtractor.php(104): Staatic\Crawler\UrlExtractor\HtmlUrlExtractor->handleElementAttributes(Object(DOMElement), Array, Object(Staatic\Vendor\GuzzleHttp\Psr7\Uri))

    ## Code In question

    if ($this->extendedUrlContext) {
    $context['htmlElement'] = (string)$element;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Team Staatic

    (@staatic)

    Hi @donamyk ,

    Thanks for reporting this HTML5 parser issue.

    We’ve found and fixed the problem – the HTML5 parser’s DOMElement doesn’t support string conversion which the extended URL context was attempting. The fix adds proper element serialization across all parser implementations.

    The fix is in the latest development version:

    1. Go to the Staatic WordPress plugin page
    2. Click “Advanced View” → “Advanced Options” → “Previous versions”
    3. Download the latest development version

    Thanks for the detailed error report. Let us know if you need anything else!

    Thread Starter Yan

    (@donamyk)

    Thanks for the fast reply.

    I can confirm that this error no longer appears

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.