Problem/Motivation

GatherContents allows templates to have repeatable text fields. It is currently possible to map them to repeatable text fields in drupal, but the content migration fails.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mathilde_dumond created an issue. See original summary.

mathilde_dumond’s picture

Uploading a patch that fixes the problem, I intend to extend it with test coverage.

mathilde_dumond’s picture

Added a check + log in case the module is confused and tries to fetch deleted content.

Berdir’s picture

Status: Active » Needs review
+++ b/src/Plugin/migrate/source/GatherContentMigrateSource.php
@@ -343,6 +344,9 @@ class GatherContentMigrateSource extends SourcePluginBase implements ContainerFa
       }
+      elseif ($item instanceof ElementSimpleText) {
+        $value[$key] = ['value' =>$item->getValue()];
+      }

missing space after =>

The entity check is strictly speaking not related but fine to have that in here as well.

Berdir’s picture

Status: Needs review » Needs work
mathilde_dumond’s picture

Status: Needs work » Needs review
FileSize
2.33 KB

thanks @berdir, fixed that

JennyDumitrescu’s picture

Hi @mathilde_dumond, I've checked the patch in #6 on our dummy site and it works fine pulling in plain text fields.
Is this supposed to also work with plain fields in paragraph fields too? Or will that be separate functionality? We have the ability to map fields into them, but they're not bringing in any content. Thanks!

Berdir’s picture

I assume you mean mapping a repeatable component to paragraphs? that is not yet supported unfortunately, we are looking into it, but it's much more complicated than this. But we are in contact with GatherContent about it and will open a separate issue once we have a plan.

Berdir’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.