The 'post new $type' link at the top of forums currently tries to allow you to post any entity type to a forum which happens to be attached to the forum vocabulary after #412518: Convert taxonomy_node_* related code to use field API + upgrade path. We need an additional check for node to limit the choices.

Comments

xano’s picture

Like what? Just forum nodes in the Forum vocabulary? (which I +1 btw)

catch’s picture

It's mainly this bit of code:

// Loop through all bundles for forum taxonomy vocabulary field.
    $field = field_info_field('taxonomy_' . $vocabulary->machine_name);
    foreach ($field['bundles'] as $type) {
      // Check if the current user has the 'create' permission for this node type.
      if (node_access('create', $type)) {
        // Fetch the "General" name of the content type;
        // Push the link with title and url to the array.
        $forum_types[$type] = array('title' => t('Post new @node_type', array('@node_type' => node_type_get_name($type))), 'href' => 'node/add/' . str_replace('_', '-', $type) . '/' . $variables['tid']);
      }
    }

But also whether we want to try to lock down the forum vocabulary field so you can only ever apply it to nodes. I think that last bit requires a small change to field API though - although there's an issue somewhere iirc.

xano’s picture

I think we need that, yes. Forum.module is nothing more than a view/wrapper around existing features. Allowing users and terms to be posted in a forum is a bug IMO.

Disclaimer: As I'm too busy to learn Field API in the next few weeks I think you won't be seeing me in this issue anymore. Just +1-ing :-P

andypost’s picture

Interesting bug, maybe just disable forum vocabulary for using within taxo-field? we have a lot of field_alter to make it

EDIT: related #837806: Forum should uninstall itself more thoroughly

andypost’s picture

Status: Fixed » Closed (fixed)

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