Closed (fixed)
Project:
Panels
Version:
6.x-3.7
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2010 at 15:08 UTC
Updated:
1 Sep 2010 at 18:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
merlinofchaos commentedHmm. That indicates you're using a module that's using panels_print_layout().
I note that the function seems to have been broken, and it's never used internally. Will see if I can fix this today.
Comment #2
alexkessler commentedI have the same error.
Views Bonus Pack is using panels_print_layout().
I already posted an issue on the Views Bonus Pack queue http://drupal.org/node/867046
Comment #3
jfpone commentedA temporary solution might be to re-introduce the panels_render_layout() function in panels/includes/display-render.inc.
I took the code from http://api.lullabot.com/panels_render_layout and it seems to work well with the Views Bonus Pack...
Here is the code :
panels/includes/display-render.inc, line 46
function panels_render_layout($layout, $content, $css_id = NULL, $settings = array(), $display = NULL) {
if (!empty($layout['css'])) {
if (file_exists(path_to_theme() . '/' . $layout['css'])) {
drupal_add_css(path_to_theme() . '/' . $layout['css']);
}
else {
drupal_add_css($layout['path'] . '/' . $layout['css']);
}
}
// This now comes after the CSS is added, because panels-within-panels must
// have their CSS added in the right order; inner content before outer content.
// If $content is an object, it's a $display and we have to render its panes.
if (is_object($content)) {
$display = $content;
if (empty($display->cache['method'])) {
$content = panels_render_panes($display);
}
else {
$cache = panels_get_cached_content($display, $display->args, $display->context);
if ($cache === FALSE) {
$cache = new panels_cache_object();
$cache->set_content(panels_render_panes($display));
panels_set_cached_content($cache, $display, $display->args, $display->context);
}
$content = $cache->content;
}
}
$output = theme($layout['theme'], check_plain($css_id), $content, $settings, $display);
return $output;
}
Comment #4
trilobite540 commentedHi, Yes that has worked for me. (I was using 3 column layout with views and they now function as expected)
Comment #5
hawkdrupal commentedSame problem, panels 3.7 broke most pages, error is "undefined function panels_render_layout()".
Restoring the the function seems to fix all the problems, which also included Domains module not displaying correct logos on page.
Perhaps a lot more use of this function than expected, better go through an official long-term deprecation process so everyone gets the heads-up.
Comment #6
merlinofchaos commentedTotally correct. Anyone want to create an actual patch for people?
panels_print_layout is already in a deprecated state. I'm not sure how panels_render_layout disappeared; it should've stayed in the same state. :(
Comment #7
droshani commentedI had the same issue which messed up whole web site, Then I went back to previous module releases and got back my web site, Now I still have a yellow box on all page which says
"There are currently no style types available to add. You should enable a module that utilizes them, such as Panels."
How can I remove this please?
Comment #8
merlinofchaos commentedTurn off the stylizer module in CTools
Comment #9
droshani commentedThanks I did that, the warning disappeared, but as soon I updated my Dynamics Image View was messed up. This Theme was developed for me and do not know why the updated of module should mess up the front view.
Comment #10
merlinofchaos commented#9: That is also irrelevant to this issue. In fact, so was #7 and I shouldn't have answered it here.
Comment #11
venusrising commentedWe were using the frontpage view panels style 1 top two bottom. Does anyone know the correct way to get around this issue without hacking panels or downgrading. . Was not sure if applying #3 is okay or if it is considered a hack?
If we go to phpmyadmin and disable the view bonus pack we then get a page not found (we are using the views frontpage) if we then go in and change the plugin style unformatted to etc it works fine. We had a big issue with this View Bonus style on last upgrade too. Looks like the view bonus pack style needs to keep up with the panels API. I hope this feedback helps.
Thanks
Comment #12
venusrising commentedAlso, regular panels pages are fine as long as stylizer is off, we did have to re-add the style but it is fine now
Comment #13
venusrising commentedGood Job jfpone , this works for me too! I am no php pro either
Thanks a ton!
Comment #14
captix commentedi got same problem
Comment #15
cedarm commentedIn panels.module, panels_print_layout() still calls the non-existent panels_render_layout(), so here's an actual patch to restore it.
I noticed that in panels-6.x-3.5 panels_render_layout() is called by panels from two places, _panels_render_display() and panels_print_layout(). Do we need _panels_render_display() back? Probably not.
Comment #16
merlinofchaos commentedCommitted. I actually put this in panels.module in with the block of deprecated functions ot make it easier to identify and later removed.
If you are experiencing this problem, please do a grep on your codebase and see which module is using panels_print_layout() and make sure there is an issue in that module's queue. Panels 3.9 will have this function removed and Panels 3.8 will probably contain a warning to administrators that this function should no longer be in use.
Comment #17
cedarm commentedBTW, the comment on panels_render_display() should be updated.
Comment #18
mariagwyn commentedI updated to the dev version. Immediately, and error stating that "CTools is out of date...all panel modules disabled...see status update" appeared.
1. The status page gave no clue as to the problem.
2. All panels stopped working, even though the modules were not actually disabled.
This was solved by updating to ctools-dev version. However, this should be noted somewhere since it took me a bit to figure out that the updated version was asking for the dev version, not the most recent non-dev version.
I also ran a grep on my modules folder, and the only module using panels_print_layout is the views_bonus pack. i will post over there if it hasn't already been done.
update: posted in views_bonus issues. It was already there, but the conversation had stopped.
http://drupal.org/node/867046#comment-3321284
Comment #19
merlinofchaos commentedThere's not much I can do about this. -dev versions are transitory. It knows that it wants an API version of CTools 1.8 -- and I try to keep the API versions in sync with CTools versions. Since CTools 1.8 hasn't been released, you have to guess that 1.8 means latest -dev. Since Panels cannot possibly know about CTools release data, we're already giving you the best information we can give.
Comment #20
mariagwyn commentedfair 'nuf
Comment #21
jessicakoh commentedThank you, jfpone (#3).
It works.
Comment #22
plastikkposen commentedSame issue. Is there a permanent solution on its way?
Comment #23
merlinofchaos commentedThe permanent solution is already in the -dev version.