Closed (fixed)
Project:
Archive
Version:
5.x-1.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2007 at 19:56 UTC
Updated:
18 Jan 2008 at 19:51 UTC
Jump to comment: Most recent file
If you browse by type, such that the url is:
/archive/blog
...and then click on "All" under the date in the Years row, you will now be searching all content types in addition to all years.
The problem comes from the fact that the "All" url is being given the url of 'archive' in the following code, however, all other links are sent through the _archive_url function which appends the /$type to the url.
$output .= '<li'. ($date->year?'':' class="selected"') .'>'. l(t('All'), 'archive', array('title' => format_plural($all_count, '1 post', '@count posts'))) ."</li>\n";
To fix, simply change the line to:
$output .= '<li'. ($date->year?'':' class="selected"') .'>'. l(t('All'), _archive_url($type,NULL,NULL) , array('title' => format_plural($all_count, '1 post', '@count posts'))) ."</li>\n";
Comments
Comment #1
Susurrus commentedTry this patch. It doesn't pass NULL and NULL, just $date, as the second null is redundant and an object should be passed in for the second argument. If this works for you, then we're good to go.
Comment #2
Susurrus commentedThis fix was incorporated into 5.x in the development branch. Try that and let me know if it works for you.
Comment #3
Susurrus commentedComment #4
SolomonGifford commentedThanks:)
Comment #5
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.