Comments

wim leers’s picture

Title: panels_views fixes and coding style/comments cleanup » panels_views coding fixes and cleanup
StatusFileSize
new10.32 KB

There were 2 bugs in panels_views_render():

1) the default wildcard argument that was being passed, "*", is invalid. At least it causes Views to render nothing at all. If I change the default wildcard to "", it works just fine.

2) the view type that is being passed to views_build_view() is not the "calculated" one. I.e.:
$view_type = $pv->view_type == 'embed' ? 'page' : $pv->view_type;
is above the function call to build the view. But in that function call, you don't use it. This caused an empty string to be passed instead, which also caused Views to render nothing at all.

Also more coding style and comment fixes.

wim leers’s picture

Title: panels_views coding style and comments cleanup » panels_views fixes and coding style/comments cleanup

I messed up the title.

wim leers’s picture

Title: panels_views coding fixes and cleanup » panels_views coding style and comments cleanup
StatusFileSize
new10.24 KB

Bugfixes should be separate from cleanups. My analysis of both bugs is extremely bad (mostly because I just fiddled with the code until it worked), so please ignore them :) I will post it in a separate issue.

Back to the origins: just coding style and comments cleanup.

merlinofchaos’s picture

Sorry Wim; I actually purposefully avoid one Drupal coding style axiom, and that's that . should not have a space between it and a string. I strongly disagree with that one. Looks like about half of this patch is for that.

wim leers’s picture

Status: Needs review » Needs work

Aha. I wonder why you didn't tell me that when I wrote Mini panels then?

Anyway, will reroll. My patch for the style plugins will probably need updating then as well.

merlinofchaos’s picture

I thought I did, actually. I don't think about it a lot. Sorry!

wim leers’s picture

Status: Needs work » Needs review
StatusFileSize
new8.48 KB

Reroll.

There is one actual code change still in this patch:

-  $block->content = views_build_view($pv->type, $view, $args, $pager_id, $nodes_per_page, 0, $offset);
+  $block->content = views_build_view($pv->view_type, $view, $args, $pager_id, $nodes_per_page, 0, $offset);

$pv->type VS $pv->view_type

The 'type' property is missing, 'view_type' is not, and you're passing a view type, so I bet that's what you meant.

merlinofchaos’s picture

Oh! That'll fix another issue!

catch’s picture

Priority: Minor » Critical

Yep this one. Tested, works.
http://drupal.org/node/205620#comment-679833

So bumping to critical.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed! Thanks!!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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