0

The site was working. I then ran composer require drupal/core -W which upgraded drupal/core from 9.5.4 to 10.0.4, as well as all its dependencies.

Full error I see (after adding $config['system.logging']['error_level']='verbose'; to settings.php) The website encountered an

unexpected error. Please try again later.

TypeError: Drupal\Core\Render\Renderer::doTrustedCallback(): Argument #1 ($callback) must be of type callable, array given, called in /var/www/cycrev/web/core/lib/Drupal/Core/Render/Renderer.php on line 788 in Drupal\Core\Render\Renderer->doTrustedCallback() (line 51 of core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php).

Drupal\Core\Render\Renderer->doCallback() (Line: 374) Drupal\Core\Render\Renderer->doRender() (Line: 446) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 160) Drupal\Core\Render\Renderer->Drupal\Core\Render{closure}() (Line: 580) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 161) Drupal\Core\Render\Renderer->renderPlain() (Line: 346) Drupal\Core\Render\HtmlResponseAttachmentsProcessor->renderHtmlResponseAttachmentPlaceholders() (Line: 203) Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments() (Line: 94) Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor->processAttachments() (Line: 45) Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond() call_user_func() (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 196) Symfony\Component\HttpKernel\HttpKernel->filterResponse() (Line: 184) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 74) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 686) Drupal\Core\DrupalKernel->handle() (Line: 19)

Are there any ways to revert the upgrade/would you recommend that?

6
  • As long as you didn't perform database updates you should be able to easily downgrade again. Like resetting the composer.json+composer-lock.json files and running composer install again. The recommended way is to do this in an isolated copy of the site+database somewhere else first and only commit the updated composer.json+composer-lock.json and config files and then basically only run composer install again on prod (or upload just the updated dist of everything after you've run composer install in some CI).
    – leymannx
    Mar 10 at 7:35
  • After you've run Composer, did you perform database updates and flushed caches? It normally goes like this ./vendor/bin/drush -y updb && ./vendor/bin/drush cr.
    – leymannx
    Mar 10 at 7:37
  • How would I reset the composer.json and .lock files? While exploring this I noticed the requires include "drupal/core": "^10.0", "drupal/core-composer-scaffold": "^9.4", "drupal/core-project-message": "^9.4", Would updating core-composer and core-composer-scaffold which have 10.0 versions potentially fix the problem?
    – schumi23
    Mar 11 at 0:29
  • When you track your files with Git you can simply reset them. If not you should have made a backup before the update. I think that the message and scaffolds are still compatible with D10 but you can try it out yourself if updating them fixes the problem. You haven't answered on performing database updates and cache flushing.
    – leymannx
    Mar 11 at 7:15
  • I did not do the database update (or anything with drush). I also did not make backups or track files with git.
    – schumi23
    Mar 11 at 15:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.