I'm having two problems which might or might not be related.
Sometimes setting a pane to Global or Page results in an empty pane, but the other options work fine.

Other times I get the output of my view regardless of the setting, but the links in the output are rewritten to /esi/panels_pane/actual-path and clicking on that produces a page where all links including css and js files are rewritten similarly.

I've tried this on a fresh install and made sure I pulled the latest esi. What else can I do to narrow this down?

Comments

mikeytown2’s picture

For global/page I set the uid to 0 before rendering the pane; this prevents the admin links from displaying for anonymous users. As for the modified links, that is a little odd.

http://drupalcode.org/sandbox/mikeytown2/1328648.git/blob/HEAD:/esi.modu...

function esi__block_handler($bid, $page = NULL) {
...
  $current_user = $user;
  // Use user 0 if the scope is global or page.
  if ($config['scope'] == 2 || $config['scope'] == 3) {
    $user = user_load(0);
  }
...
}

http://drupalcode.org/sandbox/mikeytown2/1328648.git/blob/HEAD:/esi.modu...

function esi__panel_pane_handler($bid, $page = NULL, $task_name = NULL, $context_string = NULL) {
...
  $current_user = $user;
  // Use user 0 if the scope is global or page.
  if ($config['settings']['scope'] == 2 || $config['settings']['scope'] == 3) {
    $user = user_load(0);
  }
...
}
brianmercer’s picture

Yes, it's $user = user_load(0); that is doing the empty panes and I realized it's because I'm using taxonomy access control. Not a bug. So if there's access control, you'll have to use a User setting, which makes sense.

The link rewrite happens on a fresh install but only on my dev server. I must have some mixed up code somewhere.

brianmercer’s picture

Had to set $base_url in settings.php to fix the rewrite problem. Only ESI required me to set this to have a functioning site with correct clean urls. That sounds like something that can be addressed in code, or just a documentation note that base_url may need to be set.

Thanks.

mikeytown2’s picture

Status: Active » Closed (duplicate)