Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.Problem/Motivation
Deprecated function: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in Caxy\HtmlDiff\Table\TableDiff->createDocumentWithHtml() (line 630 of /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php)
#0 /var/www/web/core/includes/bootstrap.inc(166): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php(630): mb_convert_encoding()
#3 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php(740): Caxy\HtmlDiff\Table\TableDiff->createDocumentWithHtml()
#4 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php(599): Caxy\HtmlDiff\Table\TableDiff->setInnerHtml()
#5 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php(819): Caxy\HtmlDiff\Table\TableDiff->diffCells()
#6 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php(497): Caxy\HtmlDiff\Table\TableDiff->diffCellsAndIncrementCounters()
#7 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php(847): Caxy\HtmlDiff\Table\TableDiff->diffRows()
#8 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php(286): Caxy\HtmlDiff\Table\TableDiff->diffAndAppendRows()
#9 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php(212): Caxy\HtmlDiff\Table\TableDiff->processEqualOperation()
#10 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php(147): Caxy\HtmlDiff\Table\TableDiff->diffTableRowsWithMatches()
#11 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php(106): Caxy\HtmlDiff\Table\TableDiff->diffTableContent()
#12 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiff.php(395): Caxy\HtmlDiff\Table\TableDiff->build()
#13 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiff.php(331): Caxy\HtmlDiff\HtmlDiff->diffTables()
#14 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiff.php(442): Caxy\HtmlDiff\HtmlDiff->diffIsolatedPlaceholder()
#15 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiff.php(247): Caxy\HtmlDiff\HtmlDiff->processEqualOperation()
#16 /var/www/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiff.php(110): Caxy\HtmlDiff\HtmlDiff->performOperation()
#17 /var/www/vendor/mkalkbrenner/php-htmldiff-advanced/src/HtmlDiffAdvanced.php(85): Caxy\HtmlDiff\HtmlDiff->build()
#18 /var/www/web/modules/contrib/diff/src/Plugin/diff/Layout/VisualInlineDiffLayout.php(155): HtmlDiffAdvanced->build()
#19 /var/www/web/modules/contrib/diff/src/Controller/PluginRevisionController.php(146): Drupal\diff\Plugin\diff\Layout\VisualInlineDiffLayout->build()
#20 /var/www/web/modules/contrib/diff/src/Controller/NodeRevisionController.php(55): Drupal\diff\Controller\PluginRevisionController->compareEntityRevisions()
#21 [internal function]: Drupal\diff\Controller\NodeRevisionController->compareNodeRevisions()
#22 /var/www/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#23 /var/www/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#24 /var/www/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#25 /var/www/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#26 /var/www/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#27 /var/www/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#28 /var/www/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#29 /var/www/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#30 /var/www/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#31 /var/www/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#32 /var/www/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#33 /var/www/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#34 /var/www/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#35 /var/www/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#36 /var/www/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#37 /var/www/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#38 /var/www/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#39 /var/www/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#40 {main}
Steps to reproduce
( The revisions compare a node which contains a viewfield.
The viewfield contains a view which has an exposed filter form. The error seems to be caused by a term reference field on this exposed filter form.)
It is more simple than that. The error appears on every diff.
php 8.36 on D10.3.6
Comments
Comment #2
maxilein commentedComment #3
maxilein commentedComment #4
maxilein commentedComment #5
acbramley commentedThis definitely does not happen on any diff.
This function is called by the caxy/php-htmldiff library, not the diff module directly.
I will need steps to reproduce with sample content.
Comment #6
maxilein commentedComment #7
luke.leberIt looks like perhaps an HTML table is needed in the markup to be diffed here? Can you please provide the content you're seeing this on? 🤞
We'll definitely need a failing automated test before committing any sort of bug fix to this module.
Comment #8
maxilein commentedYes I will. Thank you.
I just need some time...
Comment #9
maxilein commentedI think we can close this as a duplicate https://www.drupal.org/project/diff/issues/3419173
Comment #10
maxilein commented