Score:0

Deleting a Paragraph Item results in AJAX POST error "Missing bundle property on entity of type node."

in flag

Working with an older D7 site. On it, we have added the latest version of Paragraphs to add some content items to a page. This all works fine.

However, when trying to remove a Paragraph Item from the form, you get an AJAX error. The root of it is:

EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 8006 of /mnt/www/html/moswebsandbox1/docroot/includes/common.inc).

I've looked through common causes (orphaned nodes etc) but none of that comes up. I also don't understand why that error is thrown when I am deleting a Paragraph. Best I can tell the AJAX callback submits the node form. At a certain point when entity_extract_ids is called, the two arguments are both the node entity and the Paragraph Item entity type are passed, which seems incorrect (this will always error in that case).

How do I get to the bottom of this?

Update:

Using xdebug, I am breaking at the moment the AJAX call goes out to delete the paragraph and inspecting the form structure. This looks odd - Drupal is listing the node itself among the list of Paragraph items, but, that should not be. It should be 3 paragraph items. Somehow the node is getting cloned into this field list:

enter image description here

You can see the first item there is the node itself that the paragraphs are located on. In reality, it isn't that at all - its a paragraph item.

Update 2:

This could be the cause for me: https://www.drupal.org/project/paragraphs/issues/2452675

Disabling the Entity Translation module 'fixes' the observed issue.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.