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 :)

AttachmentSize
week.patch1.75 KB

#1

BlakeLucchesi - October 6, 2009 - 20:12

Sorry, I had left a debug function call in there to output the array. This should be a better patch to apply.

AttachmentSize
week.patch 1.7 KB

#2

Prometheus6 - October 13, 2009 - 15:15
Assigned to:Anonymous» Prometheus6

Damn...I caught that in the Month Archive module.

#3

Prometheus6 - October 19, 2009 - 02:36

Not ignoring you, got paid work to do.

#4

Prometheus6 - November 7, 2009 - 17:44
Status:needs review» fixed

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

System Message - November 21, 2009 - 17:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.