Automated Drupal 10 compatibility fixes

Created on 18 July 2022, over 2 years ago
Updated 19 July 2024, 4 months ago

Problem/Motivation

Hello project maintainers,

This is an automated issue to help make this module compatible with Drupal 10.

To read more about this effort by the Drupal Association, please read: The project update bot is being refreshed to support Drupal 10 readiness of contributed projects โ†’

Periodically patches will be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches from being posted simply close this issue (any status besides Active, Needs review or Needs work) or remove the "ProjectUpdateBotD10" tag from the issue.

The patches will be posted by the Project Update Bot โ†’ official user account. This account will not receive any issue credit contributions for itself or any company.

Proposed resolution

You have a few options for how to use this issue:

  1. Accept automated patches until this issue is closed

    If this issue is left open (status of Active, Needs review or Needs work) and the "ProjectUpdateBotD10" tag is left on this issue, new patches will be posted periodically if new deprecation fixes are needed.

    As the Drupal Rector project improves and is able to fix more deprecated API uses, the patches posted here will cover more of the deprecated API uses in the module.

  2. Leave open but stop new automated patches.

    If you want to use this issue as a starting point to remove deprecated API uses but don't want new automated patches simply leave this issue open but remove the "ProjectUpdateBotD10" tag from the issue.

    You can use Drupal Rector yourself to make these patches.

    If you want to receive automated patches again, add back the "ProjectUpdateBotD10" tag.

  3. Close it and don't use it

    If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review or Needs work) and no more automated patches will be posted here.

    If the issue is reopened, then new automated patches will be posted.

    If you are using another issue(s) to work on Drupal 10 compatibility it may be useful to other contributors to add those issues as "Related issues" when closing this issue.

Remaining tasks

Using the patches

  1. Apply the patch in the comment by Project Update Bot โ†’ .
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.

Providing feedback

If there are problems with one of the patches posted by the Project Update Bot โ†’ , such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue โ†’ . For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Infrastructure project issue queue โ†’ using the component โ€œBot: Drupal Rectorโ€.

๐Ÿ“Œ Task
Status

Fixed

Version

2.0

Component

Code

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • One additional fix, and changed de info.yml file

  • First commit to issue fork.
  • ๐Ÿ‡ง๐Ÿ‡ทBrazil murilohp

    Hey, just updating #4, there were some old jquery.once left on the js

  • Status changed to RTBC about 1 year ago
  • ๐Ÿ‡ณ๐Ÿ‡ฎNicaragua edysmp Nicaragua

    Nice work! #7 Is working for me.
    Thanks!

  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ณ๐Ÿ‡ฎNicaragua edysmp Nicaragua

    We are getting this error message when clicking the `add` icon:
    The website encountered an unexpected error. Please try again later.
    We are using php8.1 here.
    TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in count() (line 268 of modules/contrib/entityconnect/src/Controller/EntityconnectController.php).

    Drupal 10 requires php 8.1.

  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ณ๐Ÿ‡ฎNicaragua edysmp Nicaragua

    Attaching a fix for #9

  • ๐Ÿ‡ณ๐Ÿ‡ฎNicaragua edysmp Nicaragua

    Adding correct patch file.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany e5sego

    #11 Works for me, thanks!

  • Status changed to RTBC about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Bushra Shaikh

    I applied patch 11 this works for Drupal 9.5 and Drupal 10.0. and 10.0.1
    Screenshots of the compatibility on 9.5 have been attached for reference:

    Can be move to RTBC+1

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States aitala

    I've tried using this patch and get

    Error: Call to undefined method Drupal\views\Form\ViewsExposedForm::getEntity() in Drupal\entityconnect\EntityconnectFormUtils::childFormSubmit() (line 424 of modules/contrib/entityconnect/src/EntityconnectFormUtils.php).

    when I try to add a new node which is being referenced from the node I am initially editing...

    Thanks,
    Eric

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States aitala

    Here is the full backtrace

    #0 [internal function]: Drupal\entityconnect\EntityconnectFormUtils::childFormSubmit(Array, Object(Drupal\Core\Form\FormState))
    #1 /home/aitala/drupal9/web/core/lib/Drupal/Core/Form/FormSubmitter.php(129): call_user_func_array(Array, Array)
    #2 /home/aitala/drupal9/web/core/lib/Drupal/Core/Form/FormSubmitter.php(67): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState))
    #3 /home/aitala/drupal9/web/core/lib/Drupal/Core/Form/FormBuilder.php(597): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState))
    #4 /home/aitala/drupal9/web/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm('views_exposed_f...', Array, Object(Drupal\Core\Form\FormState))
    #5 /home/aitala/drupal9/web/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php(134): Drupal\Core\Form\FormBuilder->buildForm('\\Drupal\\views\\F...', Object(Drupal\Core\Form\FormState))
    #6 /home/aitala/drupal9/web/core/modules/views/src/ViewExecutable.php(1253): Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase->renderExposedForm()
    #7 /home/aitala/drupal9/web/core/modules/views/src/ViewExecutable.php(1406): Drupal\views\ViewExecutable->build(NULL)
    #8 /home/aitala/drupal9/web/core/modules/views/src/ViewExecutable.php(1469): Drupal\views\ViewExecutable->execute(NULL)
    #9 /home/aitala/drupal9/web/core/modules/views/src/Plugin/views/display/Block.php(131): Drupal\views\ViewExecutable->render()
    #10 /home/aitala/drupal9/web/core/modules/views/src/ViewExecutable.php(1645): Drupal\views\Plugin\views\display\Block->execute()
    #11 /home/aitala/drupal9/web/core/modules/views/src/Element/View.php(81): Drupal\views\ViewExecutable->executeDisplay('block_1', Array)
    #12 /home/aitala/drupal9/web/core/modules/views/src/Plugin/Block/ViewsBlock.php(61): Drupal\views\Element\View::preRenderViewElement(Array)
    #13 /home/aitala/drupal9/web/modules/contrib/context/src/Plugin/ContextReaction/Blocks.php(339): Drupal\views\Plugin\Block\ViewsBlock->build()
    #14 [internal function]: Drupal\context\Plugin\ContextReaction\Blocks->preRenderBlock(Array)
    #15 /home/aitala/drupal9/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(111): call_user_func_array(Array, Array)
    #16 /home/aitala/drupal9/web/core/lib/Drupal/Core/Render/Renderer.php(858): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
    #17 /home/aitala/drupal9/web/core/lib/Drupal/Core/Render/Renderer.php(421): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)
    #18 /home/aitala/drupal9/web/core/lib/Drupal/Core/Render/Renderer.php(493): Drupal\Core\Render\Renderer->doRender(Array)
    #19 /home/aitala/drupal9/web/core/lib/Drupal/Core/Render/Renderer.php(240): Drupal\Core\Render\Renderer->doRender(Array, false)
    #20 /home/aitala/drupal9/web/core/lib/Drupal/Core/Template/TwigExtension.php(475): Drupal\Core\Render\Renderer->render(Array)
    #21 /home/aitala/drupal9/web/sites/default/files/php/twig/65cc3e16d65e4_page.html.twig_pLWEDAuYtZMcWEWslnU1p2nlK/39i5cNhFyHObfb0L94ZcpeeuGVS3qvbuTOuZZOyHFcU.php(161): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
    #22 /home/aitala/drupal9/vendor/twig/twig/src/Template.php(394): __TwigTemplate_8e0c497690f5b6df83c5c5aa49915f71->doDisplay(Array, Array)
    #23 /home/aitala/drupal9/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
    #24 /home/aitala/drupal9/vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
    #25 /home/aitala/drupal9/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
    #26 /home/aitala/drupal9/web/core/themes/engines/twig/twig.engine(39): Twig\TemplateWrapper->render(Array)
    #27 /home/aitala/drupal9/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template('themes/contrib/...', Array)
    #28 /home/aitala/drupal9/web/core/lib/Drupal/Core/Render/Renderer.php(480): Drupal\Core\Theme\ThemeManager->render('page', Array)
    #29 /home/aitala/drupal9/web/core/lib/Drupal/Core/Render/Renderer.php(240): Drupal\Core\Render\Renderer->doRender(Array, false)
    #30 /home/aitala/drupal9/web/core/lib/Drupal/Core/Template/TwigExtension.php(475): Drupal\Core\Render\Renderer->render(Array)
    #31 /home/aitala/drupal9/web/sites/default/files/php/twig/65cc3e16d65e4_html.html.twig_1Zaxuu8AHWawQkYERDA7Bdubl/bS74p0hgm1S7dAr4VY0iJSsD7X0d92RjmEY6uX3A6F0.php(91): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
    #32 /home/aitala/drupal9/vendor/twig/twig/src/Template.php(394): __TwigTemplate_06b43dd31599b5a21c3b7c33f7917cdb->doDisplay(Array, Array)
    #33 /home/aitala/drupal9/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
    #34 /home/aitala/drupal9/vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
    #35 /home/aitala/drupal9/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
    #36 /home/aitala/drupal9/web/core/themes/engines/twig/twig.engine(39): Twig\TemplateWrapper->render(Array)
    #37 /home/aitala/drupal9/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template('themes/contrib/...', Array)
    #38 /home/aitala/drupal9/web/core/lib/Drupal/Core/Render/Renderer.php(480): Drupal\Core\Theme\ThemeManager->render('html', Array)
    #39 /home/aitala/drupal9/web/core/lib/Drupal/Core/Render/Renderer.php(240): Drupal\Core\Render\Renderer->doRender(Array, false)
    #40 /home/aitala/drupal9/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(158): Drupal\Core\Render\Renderer->render(Array)
    #41 /home/aitala/drupal9/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
    #42 /home/aitala/drupal9/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(159): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
    #43 /home/aitala/drupal9/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
    #44 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
    #45 /home/aitala/drupal9/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
    #46 /home/aitala/drupal9/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
    #47 /home/aitala/drupal9/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
    #48 /home/aitala/drupal9/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #49 /home/aitala/drupal9/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #50 /home/aitala/drupal9/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #51 /home/aitala/drupal9/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #52 /home/aitala/drupal9/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #53 /home/aitala/drupal9/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #54 /home/aitala/drupal9/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #55 /home/aitala/drupal9/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #56 /home/aitala/drupal9/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #57 /home/aitala/drupal9/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #58 /home/aitala/drupal9/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #59 /home/aitala/drupal9/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #60 /home/aitala/drupal9/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
    #61 {main}
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany e5sego

    For me, this fork and patch #11 worked under Drupal 10.2, at least at first glance.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States aitala

    @e5sego it does as long as you also apply the patch from #3168778

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States aitala

    Any timeline for this getting released?

    Thanks,
    Eric

  • First commit to issue fork.
  • Status changed to Fixed 5 months ago
  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine AstonVictor
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024