Route "webform.addons" does not exist.

Created on 9 September 2024, about 1 year ago

Problem/Motivation

Unable to deploy branches into my hosting platform

Using Drupal 10.3.2. The main issue is I cannot successfully deploy from GitHub to my hosting platform. There is an error message in the log during the Post-rollout.

BEGIN Post-Rollout drush updb
##############################################
Executing task 'drush updb' in pod cli-68d4f64b8b-9b4kc

In RouteProvider.php line 208:

Route "webform.addons" does not exist.

Failed to execute task `drush updb` due to reason `Error returned: command terminated with exit code 1`
##############################################
STEP Post-Rollout drush updb: Completed at 2024-09-09 19:14:06 (UTC) Duration 00:00:02 Elapsed 00:00:02
##############################################
Post-rollout Tasks Failed with the following error: Error returned: command terminated with exit code 1

The reason I'm asking for support here is the lines:

In RouteProvider.php line 208:
                                          
  Route "webform.addons" does not exist. 

I tried updating the webform module using composer, but the codebase and configuration were up-to-date. I don't know why this issue starting happening because my recent changes were related to changing Views. I know the problem didn't just start happening without some kind of change or input, but I haven't made a connection.

Does this error message provide any clues for troubleshooting if it's a webform issue?

๐Ÿ’ฌ Support request
Status

Active

Version

6.2

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States rraney

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

Merge Requests

Comments & Activities

  • Issue created by @rraney
  • In seeking support at those places I recommend gathering this information:

    • Details of the hosting platform. Is the platform set upโ€”even certifiedโ€”for hosting Drupal?
    • Verbose output and stack traces.
    • The definition of the "Post-Rollout" program and the expected system state and environment where it executes.
    • What, very specifically, did you change about Views that precipitated the problem?
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States rraney

    OK thanks. The platform is Amazee.io. I don't know about its certification but they are reputable.

    I will attach a full log of the deployment. Each spin-up container for staging uses a copy of the production database and git branches for code/config.

    Post-Rollout is a set of actions that are configured in the lagoon YML file after:

    • All images have been successfully built.
    • All containers are updated with the new images.
    • All containers are running have passed their readiness checks.

    There were some Views that were created probably 10 years ago which have since been migrated multiple times into several versions of Drupal, including 7, 8/9, 10. They were created when RSS feeds were more of a thing. I've been seeing a lot of messages about the feed aggregator module being deprecated. I'm trying to get rid of anything related to it, even though it's been out of our system for a good while now. This includes some feed Views, which I basically just removed in local, then pushed out to a dev branch, then to production. There were no issues when pushing these out last week.

    I thought maybe webform was being ignored by Config Ignore, but that's not the case.

  • Status changed to Closed: works as designed about 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States rraney
  • Status changed to Active 10 months ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom rajeevk London

    Hi @rraney,

    Were you able to find the issue behind it?

    We are facing this same issue on one of the machines with a fresh project setup with DDEV. However, the same code works on 6-7 different systems. Same DB, code, and config, but drush command throws error Route "webform.addons" does not exist. Thanks

  • When running drush cr in my DDEV environment, I get the error: Route "webform.addons" does not exist (RouteProvider.php line 208). Attempts to enable or list the Webform module also fail. I've tried reinstalling dependencies, clearing Drush cache, and confirming the Webform module is in modules/contrib, but the issue persists. Any guidance on resolving this would be appreciated.

  • ๐Ÿ‡จ๐Ÿ‡ดColombia carma03

    Confirming the error happened on a fresh webfrom installation on D10.3.10 and PHP 8.3.
    The solution on my end was to clear the cache through the Drupal UI instead of drush cr command.
    Drush version 13.1.1.0.

    Hope it helps you @anurag_2711 โ†’ .

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium flyke

    Have the same error, also on DDEV, after updating webform to 6.3.0-beta1.

    ddev restart did not work for me, also drush cr or drush updb did not work.
    I truncated the cachetags and every cache_* table, that also did not fix the issue.

    I cannot clear cache through the UI because every page throws that error.
    I reverted to webform 6.2.9 via composer, but now the error still persists, I cannot get rid of it.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium flyke

    Update

    I simply searched my codebase (modules/custom) for 'entity.webform.collection' and I have a custom module 'toolbar_adjustments' which adds a main link to webforms in the toolbar that is provided by the Navigation (Core experimental) module.

    /**
     * Implements hook_preprocess_HOOK().
     *
     * Make changes to the Navigation.
     */
    function toolbar_adjustments_preprocess_navigation_menu(&$variables) {
    
      // ... lots of other toolbar link adjustments here
    
      // Add a main link to webforms in the Content section.
      if (
        $variables['menu_name'] === 'content'
        && \Drupal::service('module_handler')->moduleExists('webform')
        && $current_user->hasPermission('access webform overview')
      ) {
        $variables['items']['entity.webform.collection'] = [
          'is_expanded' => FALSE,
          'is_collapsed' => FALSE,
          'in_active_trail' => FALSE,
          'title' => t('Webforms'),
          'url' => Url::fromRoute('entity.webform.collection'),
          'below' => [],
          'class' => 'webform',
        ];
    
      // ... even more toolbar link adjustments here
      }

    I commented that part out, and while drush cr still gave the Route "webform.addons" does not exist error, I could now visit and see my site again while being logged in, instead of having the WSOD. So now I was able to manually clear the caches via the UI. After that, also the drush cr command worked without a problem.

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

    I'm sorry I can't offer a solution, but I'm almost certain I had an issue with a different module that interacts with webform. It appears this is what was found by @flyke. I didn't want to ghost this issue, but I think I did some updates on modules and the issue just went away.

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

    I had this problem and noticed my last db import was incomplete. Make sure if you refreshed the db recently that it all made it in there.

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

    That sounds very familiar. I may have even had to do an entity update using Devel.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance S3b0uN3t Nantes

    It seems the problem is also identified in another issue with a suggested fix.
    I tested the suggestion; it seems to resolve the error.

    I'm linking the two issues together.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jrockowitz Brooklyn, NY

    I have seen this issue, but can't consistently reproduce it.

    My best guess is the$instance->request = $container->get('request_stack')->getCurrentRequest(); in \Drupal\webform\Controller\WebformAddonsController::create

    https://git.drupalcode.org/project/webform/-/blob/6.3.x/src/Controller/W...

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jrockowitz Brooklyn, NY

    The request object should be passed to WebformAddonsController and not injected.

    The call to $container->get('request_stack')->getCurrentRequest(); is problematic via CLI.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jrockowitz Brooklyn, NY

    If all the tests pass, this should be committed. Ideally, someone could confirm that this fixes the issue.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance S3b0uN3t Nantes

    Hello,

    With the processing of the linked ticket #34880849, the issue is no longer reproducible as such. The bug is no longer reproducible on the development branch 6.3.x.

  • Pipeline finished with Skipped
    20 days ago
    #580999
  • Pipeline finished with Skipped
    20 days ago
    #581000
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jrockowitz Brooklyn, NY

    The MR is very safe and fixes the most likely culprit to this issue.

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

Production build 0.71.5 2024