Closed (fixed)
Project:
Week Field
Version:
6.x-2.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
6 Oct 2009 at 19:09 UTC
Updated:
21 Nov 2009 at 17:50 UTC
Jump to comment: Most recent file
Started using the 2.4 branch and noticed that the menu callbacks showing all node types even though I had only selected to show blog node types in the archive pages. Here is a patch that will fix the issue. The patch was created using git but I'm sure you can apply it just the same as if it were from CVS. The main problem was that you were only using array_keys and not filtering the array prior to doing so. The array that gets returned looks like this:
array(
'type1' => 'type1',
'type2' => 0
'type3' => 0
)
By filtering the array first you get rid of all the node types which were not selected and then you grab the keys only of the ones that are.
Hope this helps :)
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | week.patch | 1.7 KB | BlakeLucchesi |
| week.patch | 1.75 KB | BlakeLucchesi |
Comments
Comment #1
BlakeLucchesi commentedSorry, I had left a debug function call in there to output the array. This should be a better patch to apply.
Comment #2
Prometheus6 commentedDamn...I caught that in the Month Archive module.
Comment #3
Prometheus6 commentedNot ignoring you, got paid work to do.
Comment #4
Prometheus6 commentedThanks for waiting. I did have the same problem with the montharchive module and had done something equivalent to what you did in your patch, so I wound up doing the same thing here.