Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.11
Component:
block displays
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jul 2010 at 05:57 UTC
Updated:
23 Nov 2017 at 12:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerDid you changed the summary order? This can be done in the argument.
Comment #2
mokko commentedBTW: When I create a new display for the same view (block) the sort order is correct (desc), but I cannot limit the number of displayed items.
Comment #3
dawehnerChange back the issue state, I hope this is fine :)
What happens if you set the pager settings, if this does not work it's a feature request :)
Comment #4
mokko commentedThanks for a very good answer! I am still new to arguments and didn't know about sorting arguments yet! It works fine now on that site.
Now, I am trying to find out if the default setting is wrong. So I go to different project, activate archive view and look at the various preview displays. Default and page show most recent month first, but block does not. I consider this a wrong default.
In case you want a patch, I attach one.
This is the view directly exported after enabling
Comment #5
mokko commentednot sure which status
Comment #6
merlinofchaos commentedNo, I'm not changing the default. There are hundreds of thousands of sites running Views. Surely some percentage of them are using the archive view with defaults, and this patch would change their sites when they update without any explanation. Maybe for some or many that's actually what they wanted, but it would not be true for all.
Comment #7
ao2 commentedFor those who still want this change without applying any patches, it can be done from the UI. This was suggested by Jake in a comment here: http://chrisshattuck.com/blog/how-create-monthly-archive-block-drupal-bl...
Step-by-step instructions:
admin/build/views/edit/archiveNode: Created year + monthAction to take if argument is not present:options selectSummary, sorted descendingRegards,
Antonio
Comment #8
egrotke commentedI've been staring at this for a while and I don't see the option for step 4 here:
"in the Action to take if argument is not present: options select Summary, sorted descending"
I'm in Drupal 6.2, on Edit view archive page.
What am I missing?
Thanks for any help!
-Eric
Comment #9
merlinofchaos commentedIt's in the argument settings.
Comment #10
paultrotter50 commentedI found that disabling the pager was a quick fix for this
Comment #11
paultrotter50 commentedI found that disabling the pager was a quick fix for this
Comment #12
darnit78 commentedI'm using Drupal 7. To help others, I'll mention the Drupal 7 way to implement 'ao2' suggestion.
While editing the view (mine was a block), open the Advanced section, and click on "Content: Created year + month" under CONTEXTUAL FILTERS. You'll find a sort order set of checkboxes there. I changed mine to Descending to cause the most recent month to display at the top of the list.
Comment #13
web506 commentedThank you darnit78 , that worked!
Comment #14
ao2 commentedAnd for the record the same thing applies to Drupal 8.
It's a standard behavior of Views, which an be easily overlooked, or forgotten. Maybe the issue is exacerbated by and the fact that the Advanced fieldset is collapsed by default.
The instructions from #12 work for D8 too.
The confusion arises from the fact that when CONTEXTUAL FILTERS are used, and When the filter value is NOT available is set to Display a summary, the summary sorting behavior overrides the general Sort criteria of the view.
I keep the two sorting settings equal to have a more consistent behavior.