Update v1.14 to 1.15 - update.php throws unexpected error

Created on 29 July 2024, 4 months ago
Updated 12 August 2024, 3 months ago

Problem/Motivation

Hello to the community
It seems there is a major issue related to the v1.15 version of token, related to the update.php part on Drupal 10.3.1.

Steps to reproduce

- update the module as usual
- run update.php
- the update.php wizard will crash with an unexpected error on 1.15 version

Proposed resolution

When you pull back to 1.14 the update.php wizard runs smoothly without any db update related stuff

Am I the only one with this behavior?

💬 Support request
Status

Fixed

Version

1.15

Component

Code

Created by

🇩🇪Germany Rikibu

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

Comments & Activities

  • Issue created by @Rikibu
  • Status changed to Postponed: needs info 4 months ago
  • 🇨🇭Switzerland berdir Switzerland

    I'm going to need to know what that error is and your environment.

  • Status changed to Active 4 months ago
  • 🇩🇪Germany Rikibu

    Hello Berdir,
    thanks for your fast reply...

    I found something in Drupals error log database

    ArgumentCountError: Too few arguments to function Drupal\token\Routing\RouteSubscriber::__construct(), 1 passed and exactly 2 expected in Drupal\token\Routing\RouteSubscriber->__construct() (Line 27 in /homepages/9/d117096044/htdocs/d9/modules/token/src/Routing/RouteSubscriber.php)
    
    #0 [internal function]: Drupal\token\Routing\RouteSubscriber->__construct()
    #1 /homepages/9/d117096044/htdocs/d9/vendor/symfony/dependency-injection/ContainerBuilder.php(1140): ReflectionClass->newInstanceArgs()
    #2 /homepages/9/d117096044/htdocs/d9/vendor/symfony/dependency-injection/ContainerBuilder.php(586): Symfony\Component\DependencyInjection\ContainerBuilder->createService()
    #3 /homepages/9/d117096044/htdocs/d9/vendor/symfony/dependency-injection/ContainerBuilder.php(531): Symfony\Component\DependencyInjection\ContainerBuilder->doGet()
    #4 /homepages/9/d117096044/htdocs/d9/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(105): Symfony\Component\DependencyInjection\ContainerBuilder->get()
    #5 /homepages/9/d117096044/htdocs/d9/core/lib/Drupal/Core/Routing/RouteBuilder.php(189): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
    #6 /homepages/9/d117096044/htdocs/d9/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild()
    #7 /homepages/9/d117096044/htdocs/d9/core/includes/common.inc(485): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
    #8 /homepages/9/d117096044/htdocs/d9/core/modules/system/src/Controller/DbUpdateController.php(362): drupal_flush_all_caches()
    #9 /homepages/9/d117096044/htdocs/d9/core/modules/system/src/Controller/DbUpdateController.php(173): Drupal\system\Controller\DbUpdateController->selection()
    #10 [internal function]: Drupal\system\Controller\DbUpdateController->handle()
    #11 /homepages/9/d117096044/htdocs/d9/core/lib/Drupal/Core/Update/UpdateKernel.php(115): call_user_func_array()
    #12 /homepages/9/d117096044/htdocs/d9/core/lib/Drupal/Core/Update/UpdateKernel.php(76): Drupal\Core\Update\UpdateKernel->handleRaw()
    #13 /homepages/9/d117096044/htdocs/d9/update.php(27): Drupal\Core\Update\UpdateKernel->handle()
    #14 {main}

    I hope this is useful.

  • Status changed to Postponed: needs info 4 months ago
  • 🇨🇭Switzerland berdir Switzerland

    Exactly how is "usual" in "update the module as usual"? Are you using composer or updating the module by hand? Using composer is strongly recommended.

    One explanation I have is that you manually updated the module and didn't properly replace all files.

    The other option is that you have configured your webserver to preload/keep files in opcache, in which case you must restart the server if you change them.

  • Status changed to Active 4 months ago
  • 🇩🇪Germany Rikibu

    Hello Berdir,
    Sorry for my delayed reply.
    I found out that the behaviour during update.php was caused ob OpCache...
    Strange on this is, that I never had such kind of issue during module database update sessions from update.php.
    Anyway.
    After turning opcache down for testings, the update ran smoothly.
    I had to figure out to move the module from "modules" to the modules/contributed" to manage it by composer. Now I moved it to composer based install to avoid future failures.

    Thanks.

  • Status changed to Fixed 4 months ago
  • 🇨🇭Switzerland berdir Switzerland

    Thanks for confirming. Closing this then.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024