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
Comment | File | Size | Author |
---|---|---|---|
#23 | views-offset-caching.patch | 1.13 KB | rromore |
#22 | views-caching-breaking-panels-offset-view-export.txt | 2.96 KB | sokrplare |
#6 | panels-skinr.jpg | 219.57 KB | asb |
#6 | panel-replicated.jpg | 209.2 KB | asb |
#5 | view-blog-records-settings.jpg | 76.46 KB | asb |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedHmm. 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.
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedAnother question: Are you using Views 2 or Views 3?
Comment #3
asb CreditAttribution: asb commentedSorry, 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).
Comment #4
asb CreditAttribution: asb commentedComment #5
asb CreditAttribution: asb commentedComment #6
asb CreditAttribution: asb commentedOK, 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
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedWell, 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.
Comment #8
asb CreditAttribution: asb commentedThank 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:
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?
Comment #9
asb CreditAttribution: asb commentedHm, 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 ;-/
Comment #10
merlinofchaos CreditAttribution: merlinofchaos commentedAHHH! 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.
Comment #11
merlinofchaos CreditAttribution: merlinofchaos commentedIn the newest version, the 'view context' is going to be a better solution than using the offset anyway.
Comment #12
asb CreditAttribution: asb commented'view context'? Oh, pleeeease do finish "Drupal's Building Blocks", there's so much to learn for people like me ;)
Comment #13
merlinofchaos CreditAttribution: merlinofchaos commentedSee my blog post yesterday about the release. =)
Comment #14
merlinofchaos CreditAttribution: merlinofchaos commentedI'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.
Comment #15
anthonylindsay CreditAttribution: anthonylindsay commentedHey guys,
FYI, I came across just this issue and this thread sorted it out for me lickety-split! Thanks a million.
A
Comment #16
gappleI 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.
Comment #17
Letharion CreditAttribution: Letharion commentedMoving 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.
Comment #18
asb CreditAttribution: asb commentedAs 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.
Comment #19
asb CreditAttribution: asb commentedI 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.
Comment #20
asb CreditAttribution: asb commentedI 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).
Comment #21
sokrplare CreditAttribution: sokrplare commentedConfirming 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:
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.
Comment #22
sokrplare CreditAttribution: sokrplare commentedViews export attached from steps described in previous comment.
Comment #23
rromore CreditAttribution: rromore commentedWe 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.