I am using Content Import to import into a content type that has a Paragraph field on it. I was getting the following error.
Notice: Undefined index: field_flexible_content in Drupal\contentimport\Form\ContentImport->createNode() (line 274 of modules/contrib/contentimport/src/Form/ContentImport.php).
Drupal\contentimport\Form\ContentImport->createNode('equipment') (Line: 83)
Drupal\contentimport\Form\ContentImport->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 585)
Drupal\Core\Form\FormBuilder->processForm('contentimport', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('contentimport', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 142)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
After looking at the field types in my content type and reviewing the switch statement in the module. I found that the field type of entity_reference_revisions wasn't present.
I will upload a patch that resolves the issue.
Comments
Comment #2
johnpicozziHere is the patch that resolved the issue for me.
Comment #3
johnpicozziHere is a patch for 8.x-3.2
Comment #5
dhayanandan_k commented@johnpicozzi Thank you for providing the patch. I have added it in dev version. Please check
Comment #6
dhayanandan_k commentedComment #8
knorton commentedClosed
Comment #9
giorgoskSo how does one import to a paragraph field "entity_reference_revisions"
I have a field
field_paragraphswith typetextwhich has a fieldfield_textI have put the following in the csv
but neither of the three are working
Comment #10
johnpicozzi@GiorgosK At this time I don't think the module supports importing into a paragraph.
Comment #11
giorgoskso what was this patch about ?
its a patch that probably does not solve anything I believe
Comment #12
johnpicozzi@GiorgosK - The Patch was to prevent error with the import for content types that had a Paragraph field on them. I was seeing errors when trying to import content to a content type that had paragraph fields. To resolve the error I made the module aware of paragraphs field types, but didn't go any further than that.
Comment #13
giorgosk@johnpicozzi
thanks makes sense now