I couldn't find an issue that seemed related, but I am getting the following notice whenever I attempt to edit, save, add paragraphs, remove paragraphs, or basically any operation:

Notice: Undefined index: widget in Drupal\paragraphs\Plugin\Field\FieldWidget\InlineParagraphsWidget->massageFormValues() (line 1328

I looked at line 1328 of InlineParagraphsWidget.php, which is:

elseif($widget_state['paragraphs'][$item['_original_delta']]['mode'] == 'remove' || $widget_state['paragraphs'][$item['_original_delta']]['mode'] == 'removed') {

I can't figure out how it's getting 'widget' in there. Any thoughts on how I should start troubleshooting this?

Comments

scottsawyer created an issue. See original summary.

scottsawyer’s picture

Status: Active » Closed (works as designed)

I found the problem, I have a hook_paragraphs_widget_actions_alter where I unset $widget_actions['dropdown_actions'] and $widget_actions['actions'].

What I did to fix it was to add ['#access'] = FALSE; to each of the actual buttons instead.

Example:

 $widget_actions['dropdown_actions']['remove_button']['#access'] = FALSE;

Errors go away and the desired affect ( remove the buttons from the paragraphs ) works.