If the 'forum' vocabulary is being shared with nodes of a type other than 'forum', then the 'Last Post' column in /forum will display that post.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

posting to subscribe- I'll try to test this patch this week. The change to the code looks reasonable.

pwolanin’s picture

Ok, confirmed the problem as described above.

Tested the patch on a small test site. Seems to fix the problem, and did not see any side effects. Re-rolled patch attached - no change in content, just did the diff from the drupal root directory as preferred.

beginner’s picture

Version: 4.7.2 » x.y.z
Status: Needs review » Needs work

for bugs that still exist in cvs, can we have a patch for cvs, first? (otherwise the bug will reappear at the next release).

Is this a bug, really?
On a clean install, if a story shares the vocabulary with the forum, when creating a story is see a drop down menu to select the forum, just as if I were creating a forum topic.

I didn't know about this 'feature', but it sounds interesting to me: I can post a blog post both in my blog and in the forum at the same time.
So either this issue should be marked 'by design' (my choice),
or the patch needs to correct more.

(...)
hmm... testing further, it seems I was wrong about the 'feature'.
The story/blog does not appear in the forum, so the select form drop-down when creating a story shouldn't be there.

beginner’s picture

I have been thinking about this issue some more during lunch :)

Maybe you should define what you mean by "shared vocabulary", because it may be that I don't understand your point and that I am missing something.

In my test, I set the "forum vocabulary" for forum nodes, and story nodes. Why would one want to do that, if not so that the story nodes to appear in the forum. In that case, the problem is not that the story information appears in the "last post" column, but that the story is NOT listed in the forum it has been added to.

This has a very practical use. I am the maintainer of the phpbb2drupal.module that people use to import their forum to Drupal. In phpBB, forum posts can have a poll, or not. After the import process, some people wondered why the polls wouldn't appear in the forum anymore, but were listed separately.

With a feature like this, if it were properly working, I could assign the 'poll' nodes to the forum vocabulary, and have polls listed together with other forum nodes in the forum, just like it is in phpBB.

There IS a bug because, whether we want it one way or the other, the behavior is not consistent. But, for those practical reasons, I thing the way to solve it is in the opposite direction to the approach in the current patch: whatever node type is associated to the forum vocabulary should not only appear in the 'last post' column, but also in the post count column, and in the listing of topics in the forum.

pwolanin’s picture

Unless I missed it, right now I don't think the story (or other node type) actually shows up in the forum; the only evidence for it being shared (the bug) is that the "last post" refers to this node instead of a forum node in the forum listing. for examle, if i have zero forum nodes, that's the count in the forum listing, but a last post still is registered.

If you use the forum term to look at the usual taxonomy/term/x page, all node types show up.

I think the attached patch is consistent with the forum module as a whole, where forum nodes are treated distinctly from other node types. However, as per the drupal developer policy, I support the idea of a patch vs. CVS first/also.

beginner’s picture

I think you missed my point. read #4 again: the story/poll/blog sharing the vocabulary "forum" don't show up in the forum: that's precisely the problem! The behavior is inconsistent as also noted in #3

You want to solve it one way, I argue for the other way.

If we go my way, 1) we solve a bug AND 2) introduce a nice feature at the same time (e.g. make it possible to have polls show in forums - as per admin settings).

If we go your way, 1) we don't have this feature 2) much more needs to be fixed than what this patch fixes.

Either way, the patch needs work.
I prefer having a new feature at the same time. Think about it.

pwolanin’s picture

I don't think this feature is as easy as you suggest, at least not if you want the "forum navigation" elements, etc. on the non-forum nodes.

I think you'll also have to argue a lot with killes if you want anything that looks like a new "feature" in the 4.7 branch. So, my thought would be to fix it along the lines of this patch for 4.7 and then cogitate on the best solution for HEAD.

I'm not understanding why you think this patch is insufficient. I guess it could be confusing to have a "Forum" drop-down for a non-forum node, but clearly any admin whose using the Forum vocab this way already has some idea of what they're getting into.

beginner’s picture

Status: Needs work » Needs review

Well, I wrote with cvs in mind, not 4.7. And it is a bug.
I gave you my honest opinion.

Now, maybe it's time to ask for other people's review, and if they agree with you, then I am happy, too :) .

ckeo’s picture

+1 to beginners idea i think some people would like to post a story or blog and have the option to have a forum created at the same time. I also think adding polls to the forum is good also.

so i think alot of people would appreciate this feature in 4.7 especially people migrating from phpbb or vbulliten installs where their userbase are accustomed to posting in forums and not at the end of stories or blogs.

Craig.

pwolanin’s picture

Well, I think the patch above should be applied to 4.7. For 4.8/5.0, a different approach could be taken if anyone wants to rewrite the forum module in the next two weeks...

pwolanin’s picture

Status: Needs review » Reviewed & tested by the community

Since no one has volunteered to rewrite the forum module, I think this patch is RTBC for HEAD (and 4.7) as a minimal fix.

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

Forums should be able to have other content types (or better yet, no forum content type and have it be driven by a default configurable content type). However, that is outside the scope of this bugfix.

Gerhard Killesreiter’s picture

applied to 4.7

Anonymous’s picture

Status: Fixed » Closed (fixed)