Error while converting translated nodes

Created on 13 March 2019, almost 6 years ago
Updated 26 February 2023, almost 2 years ago

We have two content types with multiple nodes, each translated into two languages.
While globally converting a content type to the other, the batch throws the following error :

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=290&op=do_nojs&op=do
StatusText: OK
ResponseText: Error: Call to a member function isTranslatable() on null in Drupal\Core\Entity\Sql\SqlContentEntityStorage->loadFromDedicatedTables() (line 1171 of /var/www/drupalvm/drupal/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
🐛 Bug report
Status

Active

Component

Code

Created by

🇫🇷France Pauline G

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇯🇴Jordan mhawwari

    I am getting this same error. This error is happening after calling load($id) from ConvertBundles.php in addNewFields():242
    $entity = \Drupal::entityTypeManager()->getStorage($entity_type)->load($id);
    The error is thrown on the bellow code because the $bundle variable is equal to the old bundle while the bundle key in the $definitions variable is equal to the new bundle. for our example we are converting from bundle default to bundle campaign.

    if ($langcode == LanguageInterface::LANGCODE_DEFAULT || $definitions[$bundle][$field_name]->isTranslatable()) {
    

    The values here are:

    $definitions = [
      'campaign' => [...],
    ]
    

    while

    $bundle = 'default'
    
Production build 0.71.5 2024