- 🇯🇴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 bundledefault
to bundlecampaign
.if ($langcode == LanguageInterface::LANGCODE_DEFAULT || $definitions[$bundle][$field_name]->isTranslatable()) {
The values here are:
$definitions = [ 'campaign' => [...], ]
while
$bundle = 'default'