To reproduce:
* add a entity_field content type to something that ipe controls
* remove the field from entity
* view that panel
Result: Trying to get property of non-object in ctools_entity_field_content_type_admin_title()

#1522560: Trying to get property of non-object in ctools ctools bug report on it

Comments

merlinofchaos’s picture

I think the problem is really in CTools, not Panels. It should be safe to call that. That particular plugin should play more nicely.

hefox’s picture

I considered that also, but should panels be processing non-existant content types?

merlinofchaos’s picture

It's not the content type that doesn't exist, it's the underlying field info. Panels has no way of knowing if underlying data is missing or not; the content type itself is responsible for that.

mpotter’s picture

StatusFileSize
new1007 bytes

Even though I think this can be pushed up to ctools, I'm rerolling this patch for the latest Panels 3.x-dev so I can roll an Open Atrium release.

joelpittet’s picture

This happens to me when I deleted a field that was used in a panel.

Would a better solution be to check if context is an object and if not, log a watchdog warning and return unknown?
Patch for that attached.

Note the file attached is for ctools.

Status: Needs review » Needs work

The last submitted patch, 5: 2012188-4-ctools_entity_field_content_type_admin_title.patch, failed testing.

mpotter’s picture

Would potentially be good but have a typo: "identitfier" instead of "identifier"

joelpittet’s picture

Project: Panels » Ctools
Version: 7.x-3.x-dev »
Component: In-Place Editor (IPE) » Code
Status: Needs work » Needs review
StatusFileSize
new1.27 KB

Damn, I feel like a huge identit;) Fixed thanks for noticing @mpotter

joelpittet’s picture

Re-rolled, didn't apply anymore.

joelpittet’s picture

Project: Ctools » Chaos Tool Suite (ctools)
Version: » 7.x-1.x-dev
Priority: Minor » Normal

Whoops had it assigned so some ctools sandbox:S No wonder it got no attention.

japerry’s picture

Status: Needs review » Reviewed & tested by the community

Review looks good and is working well for me. I'll keep testing it for a little bit to make sure nothing breaks. Otherwise, RTBC.

The last submitted patch, panels_ipe-title-ctools.patch, failed testing.

The last submitted patch, 4: panels_ipe-title-ctools-2012188-3.patch, failed testing.

joelpittet’s picture

Still applies, thanks @japerry:)

kobb’s picture

Same problem here. Patch in #9 worked for me. Thanks @ joelpittet

joelstein’s picture

Patch in #9 worked for me. Thanks!

dsnopek’s picture

Issue tags: +panopoly

Patch in #9 works great! RTBC +1!

We're going to include this in Panopoly soon.

ergophobe’s picture

This now *is* included in Panopoly.

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Hrm somehow I missed this when we did the commits a few months ago. This has been working for me as well, committed.

  • japerry committed 646af5d on 7.x-1.x authored by joelpittet
    Issue #2012188 by joelpittet, hefox, mpotter: IPE tries getting title...
dsnopek’s picture

Woohoo! Thanks. :-)

Status: Fixed » Closed (fixed)

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