Problem/Motivation
After updating the module from 2.0.2 to 2.0.3 I am getting following error.
Deprecated function: mb_convert_encoding(): Passing null to parameter #1 ($string) of type array|string is deprecated in Drupal\Component\Transliteration\PhpTransliteration->transliterate() (line 144 of /code/web/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php)
#0 /code/web/core/includes/bootstrap.inc(104): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 /code/web/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php(144): mb_convert_encoding()
#3 /code/web/modules/contrib/views_json_source/src/Plugin/views/query/ViewsJsonQuery.php(413): Drupal\Component\Transliteration\PhpTransliteration->transliterate()
#4 /code/web/modules/contrib/views_json_source/src/Plugin/views/query/ViewsJsonQuery.php(365): Drupal\views_json_source\Plugin\views\query\ViewsJsonQuery->transliterateValue()
#5 /code/web/modules/contrib/views_json_source/src/Plugin/views/query/ViewsJsonQuery.php(440): Drupal\views_json_source\Plugin\views\query\ViewsJsonQuery->ops()
#6 /code/web/modules/contrib/views_json_source/src/Plugin/views/query/ViewsJsonQuery.php(296): Drupal\views_json_source\Plugin\views\query\ViewsJsonQuery->parse()
#7 /code/web/core/modules/views/src/ViewExecutable.php(1488): Drupal\views_json_source\Plugin\views\query\ViewsJsonQuery->execute()
#8 /code/web/core/modules/views/src/ViewExecutable.php(1516): Drupal\views\ViewExecutable->execute()
#9 /code/web/core/modules/views/src/Plugin/views/display/Page.php(201): Drupal\views\ViewExecutable->render()
#10 /code/web/core/modules/views/src/ViewExecutable.php(1686): Drupal\views\Plugin\views\display\Page->execute()
#11 /code/web/core/modules/views/src/Element/View.php(80): Drupal\views\ViewExecutable->executeDisplay()
#12 [internal function]: Drupal\views\Element\View::preRenderViewElement()
#13 /code/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(107): call_user_func_array()
#14 /code/web/core/lib/Drupal/Core/Render/Renderer.php(910): Drupal\Core\Render\Renderer->doTrustedCallback()
#15 /code/web/core/lib/Drupal/Core/Render/Renderer.php(441): Drupal\Core\Render\Renderer->doCallback()
#16 /code/web/core/lib/Drupal/Core/Render/Renderer.php(230): Drupal\Core\Render\Renderer->doRender()
#17 /code/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(242): Drupal\Core\Render\Renderer->render()
#18 /code/web/core/lib/Drupal/Core/Render/Renderer.php(634): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#19 [internal function]: Drupal\Core\Render\Renderer::Drupal\Core\Render\{closure}()
#20 /code/web/core/lib/Drupal/Core/Render/Renderer.php(635): Fiber->start()
#21 /code/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(235): Drupal\Core\Render\Renderer->executeInRenderContext()
#22 /code/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(131): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#23 /code/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#24 /code/vendor/symfony/event-dispatcher/EventDispatcher.php(246): Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#25 /code/vendor/symfony/event-dispatcher/EventDispatcher.php(206): Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}()
#26 /code/vendor/symfony/event-dispatcher/EventDispatcher.php(56): Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
#27 /code/vendor/symfony/http-kernel/HttpKernel.php(188): Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
#28 /code/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#29 /code/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#30 /code/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#31 /code/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#32 /code/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#33 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(118): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#34 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(92): Drupal\page_cache\StackMiddleware\PageCache->pass()
#35 /code/web/modules/contrib/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
#36 /code/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
#37 /code/web/modules/contrib/pantheon_domain_masking/src/Middleware/DomainMaskingMiddleware.php(129): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#38 /code/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\pantheon_domain_masking\Middleware\DomainMaskingMiddleware->handle()
#39 /code/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(53): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#40 /code/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(54): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#41 /code/web/core/lib/Drupal/Core/DrupalKernel.php(745): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#42 /code/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#43 {main}
Steps to reproduce
Proposed resolution
I have added following below code after line 412 on this path "/src/Plugin/views/query/ViewsJsonQuery.php"
$value = $value ?? '';
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3578560.patch | 465 bytes | mhentry |
Comments
Comment #2
mhentry commentedComment #3
mhentry commentedComment #4
mhentry commented