Issue occurs on fresh Panopoly installation on

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/

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 :

// 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));
$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 false

When 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.

#1 1795474-no-fape-on-default.patch749 bytespopulist


Lowkey’s picture

Issue summary:View changes

Elaborated on findings in relation to the problem.

populist’s picture

Status:Active» Needs review
new749 bytes

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).

populist’s picture

Status:Needs review» Fixed

This patch has been committed + pushed to dev.

Ed Carlevale’s picture

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!

BParticle’s picture

wonderful! Worked for me. Thank you

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sonicthoughts’s picture

I'm running the latest dev version and still get this error :(

sonicthoughts’s picture

Status:Closed (fixed)» Active
sonicthoughts’s picture

Version:7.x-1.0-beta6» 7.x-1.x-dev
populist’s picture

Status:Active» Closed (cannot reproduce)

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.

populist’s picture

Issue summary:View changes

Added last line for completeness.