Skip to content

Errors when trying to access revisions in channels that have Preparse field(s) Craft 5.6.4 #103

@bseigel

Description

@bseigel

I was seeing errors when trying to access revisions. Craft Support said this error is coming from Preparse.

InvalidArgumentException
The current node list is empty.

  1. in /home/domains/cenic.org/craft/vendor/symfony/dom-crawler/Crawler.phpat line 602
    593594595596597598599600601602603604605606607608609610611 * @throws \InvalidArgumentException When current node is empty
    */
    public function html(?string $default = null): string
    {
    if (!$this->nodes) {
    if (null !== $default) {
    return $default;
    }

         throw new \InvalidArgumentException('The current node list is empty.');
     }
    
     $node = $this->getNode(0);
     $owner = $node->ownerDocument;
    
     if ($this->html5Parser && '<!DOCTYPE html>' === $owner->saveXML($owner->childNodes[0])) {
         $owner = $this->html5Parser;
     }
    

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions