-
Antonnavi β
authored aaff3c0f on 8.x-1.x
Issue #3177198 by Antonnavi, heddn, piggito, seorusus, waspper, vacho,...
-
Antonnavi β
authored aaff3c0f on 8.x-1.x
- Status changed to Fixed
almost 2 years ago 2:55pm 27 January 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Needs work
almost 2 years ago 11:49am 24 February 2023 - π΅πΉPortugal jcnventura
This code introduced a problem with layout builder that needs to be fixed. I've reverted this and released a new version (1.5) that doesn't have this code.
See π Update to 1.4 broken when using layout_builder Closed: duplicate
- heddn Nicaragua
It looks like we have an issue w/ the update hook updating too much at one pass. The following (untested) should fix that. As far as the other error, I'm not sure what is at issue there.
/** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository */ $entity_display_repository = \Drupal::service('entity_display.repository'); $sandbox['ids'] = []; if (!\array_key_exists('progress', $sandbox)) { $entity_types = \Drupal::entityTypeManager()->getDefinitions(); /** @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface $bundle_info_service */ $bundle_info_service = \Drupal::service('entity_type.bundle.info'); foreach ($entity_types as $entity_type_id => $entity_type) { if ($entity_type instanceof ContentEntityTypeInterface) { $bundle_info = $bundle_info_service->getBundleInfo($entity_type_id); foreach ($bundle_info as $bundle => $bundle_data) { $view_modes = $entity_display_repository ->getViewModeOptionsByBundle($entity_type_id, $bundle); foreach (array_keys($view_modes) as $view_mode) { $sandbox['ids'][] = [ 'entity_type_id => $entity_type_id, 'bundle' => $bundle, 'view_mode' => $view_mode, ]; } } } } $sandbox['max'] = count($sandbox['ids']); $sandbox['progress'] = 0; } $ids = array_slice($sandbox['ids'], $sandbox['progress'], 1); foreach ($ids as $view_mode_data) { $entity_type_id = $view_mode_data['entity_type_id']; $bundle = $view_mode_data['bundle']; $view_mode = $view_mode_data['view_mode']; $display = $entity_display_repository ->getViewDisplay($entity_type_id, $bundle, $view_mode); // Re-Save display to force applying // Linked Field configuration schema. if ($display instanceof EntityInterface) { $display->save(); } } $sandbox['#finished'] = empty($sandbox['max']) ? 1 : $sandbox['progress'] / $sandbox['max']; return new TranslatableMarkup("Updated view modes for @progress out of @max view modes.", [ '@progress' => $sandbox['progress'], '@max' => $sandbox['max'], ]);
- heddn Nicaragua
Can anyone share examples of what
formatter.third_party_settings.linked_field.destination.field
might look like or why that value exists? - πΊπΈUnited States jmester13
I have tried patch #14 and am still unable to complete the database update.