I get the following notice logged when on an edit form that includes a paragraph widget:

Notice: Undefined index: #parents in Drupal\conflict\Entity\ContentEntityConflictHandler->entityFormAlter() (line 136 of modules/contrib/conflict/src/Entity/ContentEntityConflictHandler.php).
Drupal\conflict\Entity\ContentEntityConflictHandler->entityFormAlter(Array, Object, Object, 1) (Line: 177)
conflict_prepare_entity_form(Array, Object, Object, 1) (Line: 25)
conflict_paragraphs_field_widget_paragraphs_form_alter(Array, Object, Array) (Line: 45)
conflict_paragraphs_field_widget_entity_reference_paragraphs_form_alter(Array, Object, Array) (Line: 562)

I have the conflict_paragraphs sub-module enabled.

I don't know if this suggests an actual issue - I could provide a patch to just make the notice go away, but I'm concerned this notice could actually be a symptom of a genuine problem, as I don't really understand what the code should be doing.

Comments

james.williams created an issue.

dineshkumarbollu’s picture

Hi
can you change the line $hash_path = $form['#parents']; to

if(!empty($form['#parents'])){
$hash_path = $form['#parents'];
}

and test the error.