I am recieving an error using php 5.3.9:
Strict warning: Creating default object from empty value in panels_renderer_ipe->render_pane_content() (line 145 of /Users/sylus1984/Desktop/NewKit/profiles/webexp/modules/contrib/panels/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php).
I think this is a similar issue where merlinofchaos mentions this notice in comment #33:
http://drupal.org/node/1186702
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | panels-n1632898-15.patch | 989 bytes | damienmckenna |
| #10 | 1632898-10.patch | 1004 bytes | wim leers |
| #8 | 1632898-strict-php-warning-with-empty-pane-content.patch | 865 bytes | merlinofchaos |
Comments
Comment #1
populist commentedIs this warning showing up during the installation or when you do a specific action on your site?
Comment #2
sylus commentedJust when I appear on the demo page (/demo) but no where else ^_^
Steps to reproduce I believe:
1) Use Acquia Desktop + Switch to php 5.3.9 in interface
2) Install Panopoly on top of it
3) Login and go to the demo page (home or /demo)
Comment #3
sylus commentedHmm I don't see this anymore in beta 4 so closing this issue :)
Comment #5
gábor hojtsySeeing this on Panels 7.x-3.2 on the same line of the same file. Looks like if the pane was empty, the parent returns NULL and the object is not present, therefore the error:
Line 145 is the last one. parent:.render_page_content() can possibly return NULL (or FALSE).
Comment #6
timr commentedCan someone look at this and fix it please?
I'm getting the same error and It's really annoying.
Will this be fixed in 7.x-3.x-dev ?
Comment #7
timr commentedComment #8
merlinofchaos commentedA strict warning is never major; you can always make sure that errors don't display to your users in your error handling settings.
The bug was also re-opened only 3 days before #6 was posted, so a little patience would seem to be warranted.
That said, the fix itself is quite easy.
The attached patch is committed and pushed.
Comment #9
webchickHm. For whatever reason, I'm still seeing this on the front page in the latest Spark build, which includes Panels 7.x-3.3, which therefore includes this fix. Digging.
Comment #10
wim leersIn my testing, this is only happening for the "User login" block.
From what I can tell, your patch in #8 is unfortunately a no-op, Merlin. The problem is that
$content === NULL, so it doesn't matter ifempty($content->content)is true or false; the problem is that$content->contentdoesn't exist at all, and when the place holder is being set, you're setting->contenton a non-object (i.e.:NULL).Attached is a patch that detects if
$content === NULL, and if so, it bails; it doesn't try to create a placeholder because it won't be shown anyway. That solves the symptom.The root cause lies deeper though, the "User login" block is most likely
NULLbecause there shouldn't be a user login block when the user is already logged in.Either Panels is designed to pass around these NULLs when they should render nothing, or there's a bug that's causing this block to be rendered while it shouldn't be.
Comment #11
merlinofchaos commentedPanels does sometimes have to 'render' an empty block. For example, in the IPE, it needs a placeholder in order to administer the empty block, even though nothing actually appears for that block.
Comment #12
merlinofchaos commentedAlso, empty($content) should detect a NULL.
Comment #13
wim leersNULL is considered empty. But the patch *doesn't* want it to be empty. But NULL isn't an object, so you can't set
->content.NULL->contentdoesn't make sense, right? :)Comment #14
damienmckennaTo be syntactically correct the if() statement would need to change to this:
But then the code would also have to verify that $content was an object before it gets to line 145 where it tries to assign data to its attributes, e.g.:
That said, it's possible that $content should be something else, I haven't tested it further.
Comment #15
damienmckennaA patch that includes both changes suggested in #14 (untested).
Comment #16
jhedstrom#15 resolves this warning on php 5.4.6.
Comment #17
achtonThis also works for me on PHP 5.4.4.
Comment #18
bryancasler commentedI can confirm that the patch in #15 works
Comment #19
merlinofchaos commentedIt would appear that the essence of this patch was already committed here: http://drupalcode.org/project/panels.git/commit/cd02cafcb57c6578f5c017bd...
Comment #21
bryanhidalgo commentedPatch #15 works for me too on PHP 5.4.4
Comment #22
a.milkovsky#15 works well. But I think we dont need to add !is_object to if condition
Comment #23
NetMajom commentedThe #15 is worked for me, thx
Comment #24
miromarchi commentedHi there. (I'm a very beginner)
- I had the same warning. In my case I had a node_view panel page with a variant with in place editor (ipe) enabled. When I hit "customize this page" link of ipe on the page and then I hit "save" to save changes in the layout, the warning fired.
- Also, after the warning (repeated 4 times), I had a "warning page not found" and the redirect to the node page after hitting "save" didn't work.
- #15 resolved the first warning. Thank you!
- Still I have the "warning page not found" and I end up with a "blank content" page.
Of course this is not a major.
;-)
Comment #25
edgarpe commented#15 works for me too.
Comment #26
damienmckennaYou shouldn't have to apply any patches now, you should just update to Panels 3.4.