Error: Class name must be a valid object or a string

Created on 27 July 2024, about 1 month ago
Updated 7 September 2024, about 22 hours ago

Problem/Motivation

During normal update -W via Composer I'm receiving the following...

Does anyone have some insight into what is happening here?

The update process was aborted prematurely while running update # in system_post_update_add_langcode_to_all_translatable_config.module. All errors have been logged. You may need to check the watchdog database table manually.

Error: Class name must be a valid object or a string in Drupal\Core\TypedData\TypedDataManager->createInstance() (line 99 of /html/core/lib/Drupal/Core/TypedData/TypedDataManager.php)

#0 /html/core/lib/Drupal/Core/TypedData/TypedDataManager.php(108): Drupal\Core\TypedData\TypedDataManager->createInstance()
#1 /html/core/lib/Drupal/Core/Config/Schema/ArrayElement.php(155): Drupal\Core\TypedData\TypedDataManager->create()
#2 /html/core/lib/Drupal/Core/Config/Schema/ArrayElement.php(57): Drupal\Core\Config\Schema\ArrayElement->createElement()
#3 /html/core/lib/Drupal/Core/Config/Schema/ArrayElement.php(104): Drupal\Core\Config\Schema\ArrayElement->parse()
#4 /html/core/lib/Drupal/Core/Config/Schema/ArrayElement.php(138): Drupal\Core\Config\Schema\ArrayElement->getElements()
#5 /html/core/lib/Drupal/Core/Config/Schema/ArrayElement.php(24): Drupal\Core\Config\Schema\ArrayElement->getIterator()
#6 /html/core/modules/system/system.post_update.php(270): Drupal\Core\Config\Schema\ArrayElement->hasTranslatableElements()
#7 /html/core/includes/update.inc(236): system_post_update_add_langcode_to_all_translatable_config()
#8 /html/core/includes/batch.inc(296): update_invoke_post_update()
#9 /html/core/includes/batch.inc(138): _batch_process()
#10 /html/core/includes/batch.inc(94): _batch_do()
#11 /html/core/modules/system/src/Controller/DbUpdateController.php(195): _batch_page()
#12 [internal function]: Drupal\system\Controller\DbUpdateController->handle()
#13 /html/core/lib/Drupal/Core/Update/UpdateKernel.php(115): call_user_func_array()
#14 /html/core/lib/Drupal/Core/Update/UpdateKernel.php(76): Drupal\Core\Update\UpdateKernel->handleRaw()
#15 /html/update.php(27): Drupal\Core\Update\UpdateKernel->handle()
#16 {main}

-----------------------

Warning: Undefined array key 1 in Drupal\system\Controller\DbUpdateController->results() (line 432 of /html/core/modules/system/src/Controller/DbUpdateController.php)

#0 /html/core/includes/bootstrap.inc(166): _drupal_error_handler_real()
#1 /html/core/modules/system/src/Controller/DbUpdateController.php(432): _drupal_error_handler()
#2 /html/core/modules/system/src/Controller/DbUpdateController.php(188): Drupal\system\Controller\DbUpdateController->results()
#3 [internal function]: Drupal\system\Controller\DbUpdateController->handle()
#4 /html/core/lib/Drupal/Core/Update/UpdateKernel.php(115): call_user_func_array()
#5 /html/core/lib/Drupal/Core/Update/UpdateKernel.php(76): Drupal\Core\Update\UpdateKernel->handleRaw()
#6 /html/update.php(27): Drupal\Core\Update\UpdateKernel->handle()
#7 {main}

πŸ’¬ Support request
Status

Closed: cannot reproduce

Version

2.1

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States joshuautley

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

Comments & Activities

  • Issue created by @joshuautley
  • Status changed to Postponed: needs info about 1 month ago
  • πŸ‡ΊπŸ‡ΈUnited States TR Cascadia

    Why do you think it has anything to do with this module? None of your error messages refer to any code in this module, and the failure occurred when updating the system module which is part of Drupal core ...

  • πŸ‡ΊπŸ‡ΈUnited States joshuautley

    Hi TR,

    I'm admittedly grasping at straws.

    I saw "TypedData" and Google sent me here.

    I'm familiar with your work on Ubercart.

    Please point me in a different direction and I'll go there.

    - cheers

  • πŸ‡ΊπŸ‡ΈUnited States TR Cascadia

    What I see is that the failure happened somewhere when running system.post_update.php, which is part of the Drupal core "system" module. And in particular, it failed while running the function system_post_update_add_langcode_to_all_translatable_config() that is found in system.post_update.php

    The classes like \Drupal\Core\TypedData\TypedDataManager that show up in the error messages are all part of the \Drupal\Core namespace, which means they are part of core Drupal. You can tell that by the \Drupal\Core part of the name.

    If those classes where the failure occurred were part of the typed_data module, they would be named beginning with \Drupal\typed_data.

    The system_post_update_add_langcode_to_all_translatable_config() update function was added by πŸ› Require `langcode: …` only for simple config that contains translatable values Active . Because that issue is still open and seems to have caused some problems, I would start by commenting in that issue and posting your error. You can link to this issue too. The people who worked on that issue might have a better idea of what is happening here.

    It would also be useful to add what version of core you were updating from and what version you were updating to. If composer is also updating other modules in the process, it would be useful to mention which modules were listed as being updated - your composer output would show this.

    Also, did you check the watchdog to see if the errors are logged like it said?

  • Status changed to Closed: cannot reproduce about 22 hours ago
  • πŸ‡ΊπŸ‡ΈUnited States TR Cascadia
Production build 0.71.5 2024