- 
            
              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 Fixedalmost 3 years ago 2:55pm 27 January 2023
- Automatically closed - issue fixed for 2 weeks with no activity. 
- Status changed to Needs workover 2 years ago 11:49am 24 February 2023
- π΅πΉPortugal jcnventuraThis 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 NicaraguaIt 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 NicaraguaCan anyone share examples of what formatter.third_party_settings.linked_field.destination.fieldmight look like or why that value exists?
- πΊπΈUnited States jmester13I have tried patch #14 and am still unable to complete the database update. 
- First commit to issue fork.
- π«π·France Grimreaper France π«π·Hi, Replying to comment 24. It may look like: destination: field: field: '' custom: custom: '' custom: ''See https://git.drupalcode.org/project/sobki_profile_bootstrap/-/blob/10.0.x... 
- Merge request !24Draft: Issue 3177198: Extended update hook with tweaked version of changes suggested in comment #23 β (Open) created by s_leu