The way that Node Convert decides whether a node is going from/to a forum post is by checking whether it is of type "forum". However, any content type can be put into a forum--the determining factor is whether the forum vocabulary is applied to the type--so this behavior is not correct.
This means that if you convert a post of type "forum" to another type that has the forum vocab applied, the entries in the forum table are removed, even though they are still valid. It also means that you shouldn't be forced to choose a specific forum type to put the post in if you are going between two valid forum types (the post already has the proper forum tag).
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | valid-forum-types-1798116-1.patch | 5.63 KB | kevin.dutra |
Comments
Comment #1
kevin.dutra commentedHere's a patch that does a couple things.
First, it makes "src_node_type" available in the
$dataarray that gets passed tohook_node_convert_change(), since you don't have the node to work with for the "options" and "options validate" operations. It's also just handy to have.Second, it uses checks the
$data['src_node_type']and$data['dest_node_type']to see if they have the forum vocabulary and that makes the determination on whether to do actions within the forum implementation of the hook.