The list of content types that may be added to a queue on the nodequeue's options page is in a weird order.
Thinking about the structure of my site, it's possibly by supplying module name. However, this isn't useful to ad admin at this point -- should be sorted by content type human name, since this is what's visible.

Comments

ezra-g’s picture

Can you list the current order, as well as the machine-readable and human-readable names of your content types? This was supposed to have been fixed in a previous issue.

joachim’s picture

The list appears like this:

Blog entry
Audio
Event
Event date
Flash
Product
Product book
Product CD
Product DVD
Product score
Product merchandise
Product MP3
FAQ item
Press clipping
Press release
SAM Staff
Vacancy
Embedded audio
Embedded image
Embedded video
Event series
Labs
Link
Image
Video
Article
Network Event
Network opportunity
Network Call
Network Course
Network Jobs
Personal Profile
Page
Panel text
Project
Project digital
Project learning resource
Composer
Score
Story
Supporter 

I'm not sure how to extract the machine names from the HTML for that page...
I'm not sure module name is influencing it after all. All the 'Embedded something' types are CCK, not module-provided, as is Vacancy, Press clipping, Press release, SAM Staff and many others.

ezra-g’s picture

The machine readable names appear under the "type" column at admin/content/types.

ezra-g’s picture

Status: Active » Postponed (maintainer needs more info)
joachim’s picture

Status: Postponed (maintainer needs more info) » Active

Here's the list of human and machine names from the admin content page:

Audio audio An audio clip.
Blog entry  blog 
Composer  publishing_composer 
Embedded audio  embedded_audio 
Embedded image  embedded_image 
Embedded video  embedded_video 
Event event A 
Event date  event_date  
Event series  event_series
FAQ item  about_faq
Flash flashnode 
Image media_image 
Labs  labs 
Link  link 
Network Article network_article 
Network Call  network_opportunity_call 
Network Course  network_opportunity_course  
Network Event network_event
Network Jobs  network_opportunity_jobs  
Network opportunity network_opportunity 
Page  page  
Panel text  panel_text  
Personal Profile  network_profile 
Press clipping  about_press_clipping  
Press release about_press_release
Product product 
Product CD  product_cd  
Product DVD product_dvd   edit  
Product MP3 product_mp3 
Product book  product_book  
Product merchandise product_merchandise 
Product score product_score 
Project project 
Project digital project_digital 
Project learning resource project_resource 
SAM Staff about_staff 
Score publishing_score  
Story story 
Supporter supporter 
Vacancy about_vacancy 
Video media_video 

I'm particularly intrigued as to why event / event_date / event_series appear separated on nodequeue.
event and event_date are provided by a module called civi_event. event_series is a user-defined content type, ie just created with the admin interface.

joachim’s picture

Status: Active » Closed (fixed)

Got a bit suspicious when I saw Views' node type filter had the same wacky order.
The bug is in core: node.module's _node_types_build build up $_node_types by looking at each module in turn.
I've going to close this and refile as this issue will be a bit messy to follow.

joachim’s picture

Filed http://drupal.org/node/347272, though looking at node_add() it may be that the design decision in node.module is that callers of node_get_types should sort what they are given.

joachim’s picture

Status: Closed (fixed) » Needs review

I've just noticed that CCK nodereference gets it right.
You CAN return a sorted array of node types that looks right to humans with node_get_types.

Currently, nodequeue is doing this:

  foreach (node_get_types() as $type => $info) {
    $nodes[$type] = $info->name;
  }

Do this instead:

$nodes = node_get_types('names');

That gets you the types in the right order, and it's cleaner code too! :)

Part of the problem is that the documentation for this is unclear! See http://drupal.org/node/338402

drewish’s picture

the D6 version is calling $nodes = node_get_types('names');

ezra-g’s picture

Status: Needs review » Active

There's not actually a patch here.

amateescu’s picture

Status: Active » Closed (won't fix)

Closing because 5.x is not maintained anymore and this issue is not present in 6.x or 7.x.