| Project: | Panopoly |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (cannot reproduce) |
Issue Summary
Issue occurs on fresh Panopoly installation on gotpantheon.com
Entity reference is version 7.x-1.0-rc5
Steps to reproduce:
Go to admin/structure/types/manage/panopoly_page/panelizer/default/content.
For "This node" Image or "This node" Image in the Content pane, press settings and get the following error:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /panels/ajax/editor/edit-pane/panelizer%3Adefault%3Anode%3Apanopoly_page.default%3Adefault/1
StatusText: Internal Server Error
ResponseText: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7575 of /srv/bindings/71f4f81fb54c49809cde8ec1dd911120/code/includes/common.inc).Same error occurs when trying to add new content.
From what I can tell, the problem seems to stem from panopoly_magic_form_ctools_entity_field_content_type_formatter_options_alter() in panopoly_magic.module
From line 624 :
<?php
// Add in the field edit fields with FAPE
if (empty($form_state['entity'])) {
// Determine what entity type and field name we are editing based on the form subtype and URL args.
$arg_parts = explode(':', arg(4));
list($entity_type, $field_name) = explode(':', $form_state['subtype_name']);
$entity = reset(entity_load($entity_type, array($arg_parts[2])));
?>A var dump of $arg_parts, when editing the content in the default layout of the "Content Page" content type (panels/ajax/editor/edit-pane/panelizer%3Adefault%3Anode%3Apanopoly_page.default%3Adefault/new-6), returns the following:
array (size=5)
0 => string 'panelizer' (length=9)
1 => string 'default' (length=7)
2 => string 'node' (length=4)
3 => string 'panopoly_page.default' (length=21)
4 => string 'default' (length=7)and $entity just becomes
boolean falseWhen editing the panelizer > default > content of a node of type "Content Page" directly (the bundled "Vegetables are Great" used as an example her) the dump of $arg_parts (from /panels/ajax/ipe/edit-pane/panelizer%3Anode%3A7%3Apage_manager/new-1) is:
array (size=4)
0 => string 'panelizer' (length=9)
1 => string 'node' (length=4)
2 => string '7' (length=1)
3 => string 'page_manager' (length=12)This $arg_parts can be used to generate a fully functioning $entity and not just a boolean false.
Comments
#1
Thanks for the detailed report and I was able to replicate your problem. The issue here was the FAPE support from #1772824: FAPE + Panels IPE = Great wasn't properly handling cases where you are editing the default view. I added a quick line (see patch) to only apply this technique when we are handling an actual node (not a default).
#2
This patch has been committed + pushed to dev.
#3
When Panopoly goes into the history books as a great moment in Drupal's evolution to worldwide dominance, the names Lowkey and Populist shall receive a special callout for thanks and recognition. Thanks!
#4
wonderful! Worked for me. Thank you
#5
Automatically closed -- issue fixed for 2 weeks with no activity.
#6
I'm running the latest dev version and still get this error :(
#7
#8
#9
I did an update of a number of modules in -dev and this error is no longer reproducible. Assuming it got fixed with one of the updates, probably Entity API or a planet in the Panels universe.