Closed (fixed)
Project:
Panopoly
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
1 Nov 2012 at 19:23 UTC
Updated:
23 Nov 2012 at 18:30 UTC
Jump to comment: Most recent file
I'm overriding a node type with a panelizer layout. If I attempt to add comment: field: comment body, it pops up with an ajax 500 error. See the attached image for the full error
Entitymalformedexception: missing bundle property on entity of type: comment in entity_extract_ids() (line 7575 of ... includes/common.inc)
I got this with a different field also, but I can't remember which off the top of my head.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 1829406-500-be-gone.patch | 2.49 KB | beeradb |
| 7575.jpg | 61.37 KB | esmerel |
Comments
Comment #1
merlinofchaos commentedThis appears to be a bug in Panopoly.
When I stick a print_r() in the exception in entity_extract_ids(), I discover that panopoly_magic.module is calling fape_field_edit_field_form() on line 650. However, the $entity is not valid, and fape has no provisions for that being called with an invalid entity. (This may be a validation bug in fape, from that perspective).
Comment #2
populist commentedMoved back to main queue
Comment #3
populist commentedAssinging to beeradb sine he loves UUID and FAPE
Comment #4
merlinofchaos commentedThe base issue is that when editing a pane that uses an entity context, you cannot assume the entity is already known. If it comes from arguments then the entity is merely a placeholder when using the back end. I put a hack in our panopoly magic to check for the entity before adding the FAPE call (and submit handler), and it seemed to do the trick, but I have no idea if that's correct.
Comment #5
populist commentedMind posting the code you have from #4? Panopoly Magic is making a lot of conditional judgements and adding a logical check there sounds fine.
Comment #6
beeradb commentedHere's a patch which prevents the issue from occurring.
Long term it would be nice to refactor the code around determine the entity type, field name, and entity ID. This refactoring would need to occur outside of Panopoly, as the primary issue is that the data isn't available in form_state values, so we're forced to use a combination of url args, form state values, and finger crossing to hope we can determine the correct entity. In cases like this (where this is no entity), we don't have much of a recourse currently but to do some defensive coding around the possibility.
Comment #7
beeradb commentedComment #8
populist commentedGreat. Reviewed + Pushed.