Hi,

I'm trying to create Panel with a three-column-layout (Variant -> Canvas -> Column -> Row -> Region 1 | Region 2 | Region 3).

The three columns are fed by one (the same) view and configured with the following Custom pager settings:

  • Column 1:
    • Use different pager settings from view settings (checked);
    • Use pager (unchecked);
    • Records: 1;
    • Offset: 0
  • Column 2:
    • Use different pager settings from view settings (checked);
    • Use pager (unchecked);
    • Records: 1;
    • Offset: 1
  • Column 3:
    • Use different pager settings from view settings (checked);
    • Use pager (unchecked);
    • Records: 1;
    • Offset: 2

The view gives me the latest blog entries; in column 1 there should appear the latest blog entry, in column 2 the latest -1, and in column 3 the latest -2. As simple as it gets.

However, the offset settings are ignored; whatever offset I enter, I'm getting only the latest blog entry back, in column 1, in column 2, and in colum 3.

Any ideas or suggestions?

Thanks & greetings, -asb

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

Hmm. I just tried this with the frontpage view, and it works as expected for me. Perhaps there is something specific to the settings of the view you're using?

Can you try this on a basic site with just the default frontpage view and see if you can still replicate it that way? We may need to explore what's different about the setups.

merlinofchaos’s picture

Another question: Are you using Views 2 or Views 3?

asb’s picture

Sorry, I forgot: Panels 6.x-3.5, Chaos tool suite 6.x-1.6, Views 6.x-2.11; the theme I'm using is Acquia Prosper 6.x-1.0-beta4, based on Fusion 6.x-1.0 and Skinr 6.x-1.5.

I tried to export the panel page plus the embedded view into my sandbox (CCK 6.x-3.x-dev, Views 6.x-3.0-alpha3), but Views content panes seems not to work in this environment ("Removed/missing content type" (?!)). Next I tried to export the View and add it manually three times to another (live) site with similar frontpage layout and Views 2; there I could replicate the behaviour immediately. Hmm...

Attaching an export of the View (filtering simply to a content type without any extras) plus a screenshot of its settings, and a screenshot of the panels settings (the three columns which are supposed to display different blog posts).

asb’s picture

asb’s picture

asb’s picture

Status: Postponed (maintainer needs more info) » Active
FileSize
209.2 KB
219.57 KB

OK, and last a visual "proof" how the panel looks live (first screenshot with different Skinr styles, second screenshot with replicated setting on a different site)

Is there anything else I can provide about my site's configurations?

Thanks & greetings, -asb

merlinofchaos’s picture

Well, I don't need proof in the sense that I believe you.

I need to be able to replicate the issue in order to figure out how to fix it. And my attempts are failing.

Can you try this on a fresh test site with just Panels CTools & Views? Does it fail then?

If not, we need to figure out what conditions cause it to fail for you.

asb’s picture

Version: 6.x-3.5 » 6.x-3.7

Thank you for your guidance!

I set up a minimal installation of an unaltered Drupal 6.17 with some core modules (like 'blog') plus those from contrib:

# drush up
Refreshing update status information ...
Done.
Update information last refreshed: Tue, 07/27/2010 - 13:57

Update status information on all installed and enabled Drupal projects:
 Name              Installed version  Proposed version  Status
 Drupal            6.17               6.17              Up to date
 Chaos tool suite  6.x-1.7            6.x-1.7           Up to date
 jQuery UI         6.x-1.3            6.x-1.3           Up to date
 Panels            6.x-3.7            6.x-3.7           Up to date
 Views             6.x-2.11           6.x-2.11          Up to date

Through copy & paste I created some 'blog' nodes. Also I switched to default language "English" and set "Filtered HTML" as default input format. Next I imported the panels layout and the view from #4 into Views and added it three times to the panel (View "Defaults", offset 0, offset 1, offset 2), and voila - again I got three times the same blog posting.

Next I disabled all predifined Views, including "Frontpage", and deleted the imported panel. Then I created it from scratch, labeled it "frontpage" with the path "frontpage", set it to default homepage and added the views into the three panes again, and again I got three times the same blog entry except three different ones.

Please note the updated versions of panels and ctools, so adjusting the version this issue applies to. I did a "drush cache clear" several times.

Should I try this again on a completely new install?

asb’s picture

Hm, of course I'm supposed to do a new install. And yes, with a fresh database and without any imports I'can reproduce the intended behaviour.

Next I deleted the newly created "blog" view an imported that one from #4, and again I got those three identical blog entires.

Starting to dissect the view...

Edit: Gotcha! I think it's the "Caching" setting from the view. To reproduce, try setting it to "Time-based" and "Query results": 5 min plus "Rendered output": 5 min. Save the view and reload the panel, it now should show three duplicates. Disable Views caching and three different blog entries should (re-) appear. At least in my environments this is reproducable and works like a trigger, not even the views cache has to be cleared.

Please check if you can reproduce this and feel free to move this issue anywhere appropriate.

P.S.: I'm beginning to hate caching ;-/

merlinofchaos’s picture

Title: Views pane ignores Offset in Custom pager settings » Views caching interferes with Panels-changed settings such as offsets

AHHH! Okay, that makes a lot of sense. Thank you for figuring out what's going on there.

Retitling to be more useful. Will have to think about the best way to deal with this.

merlinofchaos’s picture

In the newest version, the 'view context' is going to be a better solution than using the offset anyway.

asb’s picture

'view context'? Oh, pleeeease do finish "Drupal's Building Blocks", there's so much to learn for people like me ;)

merlinofchaos’s picture

See my blog post yesterday about the release. =)

merlinofchaos’s picture

I'm not at all sure what can actually be done about this, unfortunately. It's entirely possible that the checkbox to change those settings might also require disabling caching; that is the only solution I can think of.

anthonylindsay’s picture

Hey guys,

FYI, I came across just this issue and this thread sorted it out for me lickety-split! Thanks a million.

A

gapple’s picture

I think I may have run into a similar issue.

My site utilizes a Views Panel Pane in two instances, the first is a limited view for the front page (10 items, no pager) and the second is a full page (25 items with pager).
If the front page is loaded first, its result is cached. The page is then loaded after, retrieving the cached data and only receiving the 10 cached items rather than the full result that it requires.

I also did a quick check on a view using a pager; if an invalid page is entered (e.g. page 5 of 2) the view will act as if no page value was entered and show the first page of results.
This may be causing the triple pane error: the first pane is generated and cached, the subsequent panes load the cached value which only contains one page of results and so the first page is repeated.

I have attempted to remedy this for now by disabling caching on the View, and moving it to Panels, since I am using a rather simple view.

Letharion’s picture

Version: 6.x-3.7 » 7.x-3.x-dev

Moving this to 7 since it should probably be fixed there first. Can anyone confirm this is still an issue in D7? Or an issue at all? There have been two releases of Panels since this issue was last updated.

asb’s picture

As far as I am concerned, I have completely stopped using Panels caching a long time ago and solely rely on Views caching, so I really can't tell.

asb’s picture

I just got this with Panels 6.x-3.10 and even without any Panels caching. This time, I had to disable the view's block caching to get a two-column layout with offsets working. Pretty bizarre: Now Panels caching seems to work (with "Granularity: Context"), so on this site it behaves exactly the other way around like in my initial issue report from May 31, 2010.

asb’s picture

I ran into this again; in this case, the workaround from #19 did the trick once more: Don't use Views cachin, switch to Panels caching for this certain View (applicable for Views 3 on D6).

sokrplare’s picture

Confirming this is an issue in D7 with Views 3 for Views caching. Just tried on www.simplytest.me with a plain vanilla install (D7.24-dev, Views 7.x-3.7, Panels 7.x-3.3, CTools 7.x-1.3) to double-check. Here are the steps:

  1. Install latest D7, Views and Panels along with dependencies
  2. Enable the modules Views, Views UI, Panels, Panels nodes and Views content panes
  3. Create two pieces of content and one panels node page
  4. Create a View showing only 1 piece of content, use the Content pane display and allow the Panels setting for Offset (see attached View export)
  5. Add the View content pane to two places in your panel, leave the first one with an offset of 0 and the second with an offset of 1
  6. View your panel page - with no Views caching enabled you should see both article titles
  7. Edit your View and enable Time-based caching with any time length
  8. Return to your panel page - you should now see the same article title in both panes

Switching to Panels caching resolved for me too - great idea. Unfortunately for us we have several large sites with a ton of Views panes being added by non-technical users so it isn't a viable option.

sokrplare’s picture

Views export attached from steps described in previous comment.

rromore’s picture

FileSize
1.13 KB

We were facing a similar issue and found that this is probably related to views caching. Two other issues that seem to be related are https://drupal.org/node/1055616 and https://drupal.org/node/1039802. Since we only needed caching on the same view with different offsets, we just included the offset in the cache key.