When opening a new thread in advanced forum, taxonomy term calls wrong, and the first post is presented as a response to topic opened in another subforum. I am using Advanced Forum, nodecomments and Forum Access for access restriction. Thing works correctly only with 6.x-2.0-beta3.
Sorry if the topic is open in the wrong place.

CommentFileSizeAuthor
#9 nodecomment_824308.patch634 bytescrea

Comments

crea’s picture

Are you sure there are no hidden variables that change besides beta5 - beta3 difference ? I have no idea how we could mess taxonomy queries up..

miljats’s picture

What are hidden variables, if you could give me one example.

What I am sure is that after upgrading nodecomments beta-3 to beta-4, site broke up totally (some error message appeared on the top of the white screen) and after upgrade to beta-5, site came back with described issue.

One example if you wish to reproduce this bug (maybe not nodecomments bug):

Use Advanced forum, Nodecomments, Forum access.

Category - public
Forum 1
Create New Forum topic, not comment to existing topic and new topic form is displayed like reply to topic 2 from Category private - Forum2.

Category - private
Forum 2
Existing topic 2

thanks for your time

crea’s picture

Is it reproducable on a clean site with just these modules enabled ?

miljats’s picture

Yes, it can be reproduced but with dependant modules enabled.

D6.17 +
acl
advanced forum 2
forum access
views
author pane
ctools
nodecomments

Create 2 Containers and 2 Forums, set different forum access for each Container and try to post two new forum topics, one in Container 1 and second in Container 2.

jbizzay’s picture

I too can reproduce the problem exactly as you've described it. I thought it was advanced_forum at first, but only goes away when disabling nodecomment. Example: going to node/add/forum/4 , it loads node with nid of 4, but 4 is supposed to be the forum tid

jbizzay’s picture

The url path in question is node/add/[content-type]/1, where 1 could be either a tid or a nid. With the defaults, you'll have forum and comment content types, so you'll have node/add/forum/1 to create a new topic in forum tid 1, and node/add/comment/1 to reply to topic with nid of 1.

I seemed to have fixed the issue for now with this edit, though i will be testing it thoroughly over the next couple of days. It basically adds a check for the content type of comment

nodecomment.module ln 295:

replaced:
if (arg(0) == 'node' && arg(1) == 'add' && is_numeric(arg(3))) {
with:
if (arg(0) == 'node' && arg(1) == 'add' && arg(2) == 'comment' && is_numeric(arg(3))) {

miljats’s picture

Nice, your replacement works fine. Little testing and we´ll have a working beta-5.

Thank you.

crea’s picture

Priority: Normal » Critical

Oh, I got it. This is quite bad. Btw, you have to check if arg(2) is a comment type using a special function of Node Comments. Comment types are configurable.

crea’s picture

Status: Active » Needs review
StatusFileSize
new634 bytes
miljats’s picture

Thanks crea, works like a charm.

evanbarter’s picture

Status: Needs review » Reviewed & tested by the community

Patch is good, let's get it committed.

crea’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in dev.

Status: Fixed » Closed (fixed)

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