Showing all node types
BlakeLucchesi - October 6, 2009 - 19:09
| Project: | Weekly Archive by Node Type |
| Version: | 6.x-2.4 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Prometheus6 |
| Status: | closed |
Description
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 :)
| Attachment | Size |
|---|---|
| week.patch | 1.75 KB |

#1
Sorry, I had left a debug function call in there to output the array. This should be a better patch to apply.
#2
Damn...I caught that in the Month Archive module.
#3
Not ignoring you, got paid work to do.
#4
Thanks 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.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.