Skip to content

Fixes a Drupal11 issue before the actual upgrade.#738

Open
vincent-gao wants to merge 1 commit intodevelopfrom
fixes-new-alias-field-to-router-table-issue
Open

Fixes a Drupal11 issue before the actual upgrade.#738
vincent-gao wants to merge 1 commit intodevelopfrom
fixes-new-alias-field-to-router-table-issue

Conversation

@vincent-gao
Copy link
Contributor

@vincent-gao vincent-gao commented Feb 18, 2026

Issue

I'm not sure why the Drupal maintainers didn't catch this issue; it's possible their test database is less strict.

==> Importing database
 [warning] It is slow to pass large amounts of data via stdin to the sql:cli command. See the Examples at https://www.drush.org/latest/commands/sql_cli/ for an alternative using sql:connect.
 [error]  Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'alias' in 'field list': INSERT INTO "router" ("name", "route", "alias") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2), (:db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5), (:db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8), (:db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11); Array
(
    [:db_insert_placeholder_0] => entity.block_content_type.add_form
    [:db_insert_placeholder_1] => O:31:"Symfony\Component\Routing\Alias":2:{s:44:"\Symfony\Component\Routing\Alias\deprecation";a:0:{}s:35:"\Symfony\Component\Routing\Alias\id";s:22:"block_content.type_add";}
    [:db_insert_placeholder_2] => block_content.type_add
    [:db_insert_placeholder_3] => entity.block_content.add_page
    [:db_insert_placeholder_4] => O:31:"Symfony\Component\Routing\Alias":2:{s:44:"\Symfony\Component\Routing\Alias\deprecation";a:0:{}s:35:"\Symfony\Component\Routing\Alias\id";s:22:"block_content.add_page";}
    [:db_insert_placeholder_5] => block_content.add_page
    [:db_insert_placeholder_6] => entity.node.add_page
    [:db_insert_placeholder_7] => O:31:"Symfony\Component\Routing\Alias":2:{s:44:"\Symfony\Component\Routing\Alias\deprecation";a:0:{}s:35:"\Symfony\Component\Routing\Alias\id";s:13:"node.add_page";}
    [:db_insert_placeholder_8] => node.add_page
    [:db_insert_placeholder_9] => entity.node.add_form
    [:db_insert_placeholder_10] => O:31:"Symfony\Component\Routing\Alias":2:{s:44:"\Symfony\Component\Routing\Alias\deprecation";a:0:{}s:35:"\Symfony\Component\Routing\Alias\id";s:8:"node.add";}
    [:db_insert_placeholder_11] => node.add
)
 in Drupal\Core\Routing\MatcherDumper->dump() (line 160 of /app/docroot/core/lib/Drupal/Core/Routing/MatcherDumper.php). 

In ExceptionHandler.php line 96:
                                                                               
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'alias' in 'field li  
  st': INSERT INTO "router" ("name", "route", "alias") VALUES (:db_insert_pla  
  ceholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2), (:db_inser  
  t_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5), (:db_  
  insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8),   
  (:db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholde  
  r_11); Array                                                                 
  (                                                                            
      [:db_insert_placeholder_0] => entity.block_content_type.add_form         
      [:db_insert_placeholder_1] => O:31:"Symfony\Component\Routing\Alias":2:  
  {s:44:"\Symfony\Component\Routing\Alias\deprecation";a:0:{}s:35:"\Symfony\C  
  omponent\Routing\Alias\id";s:22:"block_content.type_add";}                   
      [:db_insert_placeholder_2] => block_content.type_add                     
      [:db_insert_placeholder_3] => entity.block_content.add_page              
      [:db_insert_placeholder_4] => O:31:"Symfony\Component\Routing\Alias":2:  
  {s:44:"\Symfony\Component\Routing\Alias\deprecation";a:0:{}s:35:"\Symfony\C  
  omponent\Routing\Alias\id";s:22:"block_content.add_page";}                   
      [:db_insert_placeholder_5] => block_content.add_page                     
      [:db_insert_placeholder_6] => entity.node.add_page                       
      [:db_insert_placeholder_7] => O:31:"Symfony\Component\Routing\Alias":2:  
  {s:44:"\Symfony\Component\Routing\Alias\deprecation";a:0:{}s:35:"\Symfony\C  
  omponent\Routing\Alias\id";s:13:"node.add_page";}                            
      [:db_insert_placeholder_8] => node.add_page                              
      [:db_insert_placeholder_9] => entity.node.add_form                       
      [:db_insert_placeholder_10] => O:31:"Symfony\Component\Routing\Alias":2  
  :{s:44:"Symfony\Component\Routing\Aliasdeprecation";a:0:{}s:35:"Symfony\\\\  
  Component\Routing\Alias\id";s:8:"node.add";}                                 
      [:db_insert_placeholder_11] => node.add                                  
  )                                                                            
                                                                               

In PdoTrait.php line 109:
                                                                               
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'alias' in 'field li  
  st'        

@vincent-gao
Copy link
Contributor Author

I may also open an issue on Drupal.org.

@anthony-malkoun
Copy link
Contributor

I may also open an issue on Drupal.org.

Hey Vincent, at this point we're not on D11 yet? So the field shouldn't actually exist yet? Is this perhaps an issue with the calling module, i.e. is it default content?

@vincent-gao
Copy link
Contributor Author

vincent-gao commented Feb 19, 2026

I may also open an issue on Drupal.org.

Hey Vincent, at this point we're not on D11 yet? So the field shouldn't actually exist yet? Is this perhaps an issue with the calling module, i.e. is it default content?

Hi

I may also open an issue on Drupal.org.

Hey Vincent, at this point we're not on D11 yet? So the field shouldn't actually exist yet? Is this perhaps an issue with the calling module, i.e. is it default content?

Hi @anthony-malkoun , thanks for the CR.
router table will be updated when the router rebuild happens. mostly via drupal_flush_all_caches()router.builder->rebuild()dumper->dump(), which is triggered by drush updb, drush cr, module install, etc. so this isn't a default content issue, the field is added in the schema yml in Drupal 11 and is populated during normal route rebuilds.
The issue is that Drupal core added this update hook in Drupal 11, which is too late. the error occurs before the hook even runs.

@github-actions
Copy link

@anthony-malkoun, @MdNadimHossain
This PR has been open for 7 days - please review and merge ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants