diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b9ccfb5..78c5088 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ jobs: name: PHPUnit Coverage Tests runs-on: ubuntu-latest container: - image: pookmish/drupal8ci:latest + image: pookmish/drupal8ci:php8.3 services: mysql: image: mysql:8.0 @@ -77,7 +77,7 @@ jobs: # DRUPAL_DATABASE_PASSWORD: drupal # DRUPAL_DATABASE_HOST: mysql # container: -# image: pookmish/drupal8ci:latest +# image: pookmish/drupal8ci:php8.3 # options: '--network-alias drupal8ci' # services: # mysql: @@ -113,7 +113,7 @@ jobs: # DRUPAL_DATABASE_PASSWORD: drupal # DRUPAL_DATABASE_HOST: mysql # container: -# image: pookmish/drupal8ci:latest +# image: pookmish/drupal8ci:php8.3 # options: '--network-alias=drupal8ci' # services: # selenium: diff --git a/CHANGELOG.md b/CHANGELOG.md index e55f763..1a7d30a 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Stanford Migrate +8.6.5 +-------------------------------------------------------------------------------- +_Release Date: 2024-09-11_ + +- Mark readonly fields for migrated fields with delta values. + 8.6.4 -------------------------------------------------------------------------------- _Release Date: 2024-08-08_ diff --git a/stanford_migrate.info.yml b/stanford_migrate.info.yml index 09b1b91..995742e 100755 --- a/stanford_migrate.info.yml +++ b/stanford_migrate.info.yml @@ -3,7 +3,7 @@ description: 'Adds more functionality to migrate and migrate plus modules' type: module core_version_requirement: ^10.3 || ^11 package: 'Stanford' -version: 8.6.4 +version: 8.6.5 dependencies: - drupal:migrate - empty_fields:empty_fields diff --git a/stanford_migrate.module b/stanford_migrate.module index f9ae4b7..c2f7588 100755 --- a/stanford_migrate.module +++ b/stanford_migrate.module @@ -87,7 +87,6 @@ function stanford_migrate_entity_form_display_alter(EntityFormDisplayInterface $ $field_definitions = $form_display->get('fieldDefinitions'); foreach ($form_display->getComponents() as $field_name => $component) { - // Make sure the field component is one of the field definitions. if (empty($field_definitions[$field_name])) { continue; @@ -97,12 +96,12 @@ function stanford_migrate_entity_form_display_alter(EntityFormDisplayInterface $ // fields that are mapped from migration as readonly. $field_definition = $field_definitions[$field_name]; $columns = $field_definition->getFieldStorageDefinition()->getColumns(); - $processing = !empty($migration->process[$field_name]); + $processing = !empty($migration->process[$field_name]) || !empty($migration->process["$field_name/0"]); // This will check if a migrate process is mapped to a specific column on // the field. foreach (array_keys($columns) as $column) { - $processing = $processing ?: !empty($migration->process["$field_name/$column"]); + $processing = $processing ?: !empty($migration->process["$field_name/$column"]) || !empty($migration->process["$field_name/0/$column"]); } // If the migration destination has the `overwrite_properties` configured,