I've read through the other posts about paging and caching, and I'm still a bit confused. Is it possible to use caching in panels, and have a full pager?
When I'm using a view pane with a full pager set in views, but with caching turned on in panels, it will never go to another page. I see the pager control and I've tried clicking both the page numbers, next, or Last. If I turn off the cache in panels, and turn on caching in views, the pager works correctly.

Comments

wxman’s picture

Title: Useing cache paging and panels not working » Using cache paging and panels not working
dawehner’s picture

Project: Views (for Drupal 7) » Panels
Version: 6.x-2.12 » 6.x-3.x-dev
Component: page displays » Code

That's more of a panels question, as it's about panels caching.

In theory there is some code which makes caching work, but it seems not to work for you.
How did you embedded the view into the panel?

wxman’s picture

As a pane, with a taxonomy term context.

slashrsm’s picture

It will work if you use Panel display mode in views and push pager configuration to panels. Panels are not aware that pager exists if not, so this should be the recommended way to do it IMO.

wxman’s picture

I think I'm confused. I'm not sure what you mean by "Panel display mode". I really thought I was more familiar with views and panels than that. I saw something about it in the Display suite module, but I don't use that one.

The paging works fine as long as I don't turn on caching. I would rather cache in panels than in views. The paging does work if I only set the caching in views.

merlinofchaos’s picture

I believe what slashrsm means is 'Content pane' display in Views.

In the cache plugin, the 'page' variable is only respected if the 'use_pager' setting is true in the pane configuration:

  if(!empty($pane->configuration['use_pager'])) {
    $id .= ':p' . check_plain($_GET['page']);
  }

That's probably kind of a bogus way to check, but that's the issue.

Becuase there are MANY ways to get a view into a panel, it could be a little difficult to tell you precisely what to do without understanding your current configuration.

wxman’s picture

Without posting all the configs, I'll try to give an idea of what I have. The panel page is the Taxonomy term template that I activated. For one example of how I'm using it, it's for displaying books of different categories, The categories are set in taxonomy terms, like fiction, non-fiction, etc. Briefly, I made a view using a Content pane with these settings:
Fields
Grid layout
Full pager
Argument: Taxonomy: Term ID (with depth)
Pane settings: Argument input, First from panel argument.
Allow settings: Use pager
Link to view: No
Use panel path: No

The panel page has a context set to Taxonomy vocabulary, and the content is showing the pane from the view. I planed on using the Cache actions module to control the cache clearing set at the pane level. Something went wrong with that, so now I'm going to cache at the variant level. I hope that's enough info. If not just let me know. If nothing works, I still can cache using views, and paging will work. I've read that it's more efficient to cache panels instead.

Letharion’s picture

Status: Active » Fixed

@wxman If you look at the settings for the view that are specific to the particular content pane that you are having problems with, there is a setting where you can essentially say "Hand the pager over to panels". It's under "Allow settings" and you want "Use pager". Without this, Panels never knows there is a pager to handle, an caching will break the pager.

Re-open if you still need help, but I've seen that your cache actions issue has finally been resolved, so perhaps this isn't as relevant for you anymore :)

wxman’s picture

Thanks for the reply. I did have the use pager setting turned on in the view setting for the pane. The cache issue does seem to be fixed now, but the paging still isn't working. I'm only seeing it on the Taxonomy term template page, and it's definitely a cache related problem. If I turn on any of the caches on the panel side, paging won't work. If I turn caching on in views, paging works. This isn't a "major" problem because I can use the cache in views for now, and an un-cached page really isn't a site breaker anyway. If someone can think of a solution, I'll be happy to try it. If I find what's going on I'll post it as well.

Letharion’s picture

Well there no way here to reproduce the problem reliably, so I will just leave the issue as is until there is.

Status: Fixed » Closed (fixed)

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