($source) must not be empty

Created on 5 May 2025, 13 days ago

Problem/Motivation

  • I am using Drupal 10.4.6, and have tried Diff versions 8.x.1.8 and 2.0.0-beta3 with the same results.
  • I have tried various configuration settings, and have simplified the comparison to just the title, with the same results.
  • Other than comparing two revisions, I do not know how to predictably repeat this error. On the same node, some revision comparisons work as expected. And on others, I get the error below:
Notice: iconv(): Detected an illegal character in input string in /var/www/html/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php on line 630
The website encountered an unexpected error. Try again later.

ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in DOMDocument->loadHTML() (line 630 of /var/www/html/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php).
Caxy\HtmlDiff\Table\TableDiff->createDocumentWithHtml() (Line: 642)
Caxy\HtmlDiff\Table\TableDiff->parseTableStructure() (Line: 618)
Caxy\HtmlDiff\Table\TableDiff->buildTableDoms() (Line: 100)
Caxy\HtmlDiff\Table\TableDiff->build() (Line: 395)
Caxy\HtmlDiff\HtmlDiff->diffTables() (Line: 331)
Caxy\HtmlDiff\HtmlDiff->diffIsolatedPlaceholder() (Line: 442)
Caxy\HtmlDiff\HtmlDiff->processEqualOperation() (Line: 247)
Caxy\HtmlDiff\HtmlDiff->performOperation() (Line: 110)
Caxy\HtmlDiff\HtmlDiff->build() (Line: 85)
HtmlDiffAdvanced->build() (Line: 136)
Drupal\entity_diff_ui\Plugin\diff\Layout\EntityVisualInlineDiffLayout->build() (Line: 181)
Drupal\diff\Controller\PluginRevisionController->compareEntityRevisions() (Line: 58)
Drupal\diff\Controller\NodeRevisionController->compareNodeRevisions()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)
πŸ› Bug report
Status

Active

Version

1.8

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sassafrass

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024