Drupal 6.9
My test user has appropriate "User Permissions." (admin/user/permissions)
For extra permissions that forum_access offers, my user has the following permissions for a test forum:

View this forum
Post in this forum

Viewing forums with the test user (forum/) I see the forum that I gave permissions to view.
Selecting "Post new forum topic" I am able to begin a post and select the forum.
Upon submitting a post I am returned to a page showing "Access denied: You are not authorized to access this page." (node/## : the location where the post exists)

How come I am not able to view the post? Which permission do I have to set so as to allowing seeing threads in the forum that I supposedly have access to view?

Comments

mizerydearia’s picture

Upon further testing I noticed the following:

Allowing "View this forum" access to anonymous and then posting with my authenticated test user I was able to see my post immediately after posting as well as see that the thread existed in the forum. Removing the "View this forum" access from anonymous and reloading the pages for displaying forum content and the thread page, I was unable to access the thread I had created even though I was still authenticated as the same user and the forum appeared empty, as if no posts existed in it (although it seems as if I didn't have permission to see what was inside, which was strange since I could see that the forum existed at all).

Are these bugs or am I missing something?

salvis’s picture

Status: Active » Postponed (maintainer needs more info)

I can't say, but I'm interested in pursuing this. However, I need you to follow the directions that were displayed when you posted your issue, otherwise we're completely in the dark.

mizerydearia’s picture

For any issue, always post the path (URL without host name) that is causing problems.
- forum/
- forum/2

"Viewing forums with the test user (forum/) I see the forum that I gave permissions to view."
In addition to seeing that the forum exists, I also see 0 topics and 0 posts with a last post of "n/a" even though many hours ago when I first wrote above, I had just posted a new test message to the forum and can see that it does exist within the forum using admin user/1 account.

1) I have been up-to-date with the "recommended" Forum Access and ACL releases for my version of Drupal.
Drupal 6.9
Forum Access 6.x-1.0-beta2
ACL 6.x-1.0-beta4
2) forum_access changelogs are exact same. Nothing exciting in ACL changelog.
3) Finis!
4) Node picked: forum/ - I don't see any "of its node access records as shown by Devel Node Access."
4 again) Node picked: forum/2 - I don't see any "of its node access records as shown by Devel Node Access." again.
I tried both 4s above with my test user AND admin user/1 with the same result for both users.\
5) realm: all, 17 public nodes. realm: image_gallery_access, 8 private nodes.

salvis’s picture

You need to install Devel Node Access, enable its debug mode, look at a node (i.e. a forum post), and report the DNA output.

mizerydearia’s picture

1) Finis! see above
2) Finis! see above
3) Finis! see above
4) Node picked: node/27 (a forum post) - I don't see anything from my test user, but as admin user/1 I see extra tabs.

Dev load:

#
... (Object) stdClass
      nid (String, 2 characters ) 27
      type (String, 5 characters ) forum
      language (String, 2 characters ) en
      uid (String, 1 characters ) 3
      status (String, 1 characters ) 1
      created (String, 10 characters ) 1234181594
      changed (String, 10 characters ) 1234181594
      comment (String, 1 characters ) 2
      promote (String, 1 characters ) 0
      moderate (String, 1 characters ) 0
      sticky (String, 1 characters ) 0
      tnid (String, 1 characters ) 0
      translate (String, 1 characters ) 0
      vid (String, 2 characters ) 27
      revision_uid (String, 1 characters ) 3
      title (String, 12 characters ) Test Subject
      body (String, 12 characters ) Test Message
      teaser (String, 12 characters ) Test Message
      log (String, 0 characters )
      revision_timestamp (String, 10 characters ) 1234181594
      format (String, 1 characters ) 1
      name (String, 13 characters ) FirstName LastName
      picture (String, 54 characters ) sites/default/files/pictures/picture-fb_1187055...
          o
            sites/default/files/pictures/picture-fb_1187055300.jpg
      data (String, 399 characters ) a:7:{s:13:"form_build_id";s:37:"form-5e4e475084...
          o
            a:7:{s:13:"form_build_id";s:37:"form-5e4e475084de02291ed4563d6dda753b";s:14:"picture_delete";i:0;s:14:"picture_upload";s:0:"";s:7:"contact";i:1;s:19:"friendfeed_username";s:0:"";s:14:"friendfeed_key";s:0:"";s:23:"friendfeed_contenttypes";a:11:{i:1;i:1;i:0;i:1;s:4:"blog";b:0;s:4:"book";b:0;s:3:"faq";b:0;s:4:"feed";b:0;s:5:"forum";b:0;s:5:"image";b:0;s:4:"page";b:0;s:4:"poll";b:0;s:5:"story";b:0;}}
      tid (String, 1 characters ) 2
      realname_save (String, 13 characters ) firstname.lastname
      realname (String, 13 characters ) FirstName LastName
      homepage (NULL)
      last_comment_timestamp (String, 10 characters ) 1234181594
      last_comment_name (NULL)
      comment_count (String, 1 characters ) 0
      taxonomy (Array, 1 element)
          o
            2 (Object) stdClass
                +
                  tid (String, 1 characters ) 2
                +
                  vid (String, 1 characters ) 1
                +
                  name (String, 7 characters ) General
                +
                  description (String, 38 characters ) We welcome our guests to discuss here.
                +
                  weight (String, 1 characters ) 0
      files (Array, 0 elements)
      iid (Boolean) FALSE
      locations (Array, 0 elements)
      location (Array, 0 elements)
      forum_tid (String, 1 characters ) 2

Dev render:

#
... (Object) stdClass
      nid (String, 2 characters ) 27
      type (String, 5 characters ) forum
      language (String, 2 characters ) en
      uid (String, 1 characters ) 3
      status (String, 1 characters ) 1
      created (String, 10 characters ) 1234181594
      changed (String, 10 characters ) 1234181594
      comment (String, 1 characters ) 2
      promote (String, 1 characters ) 0
      moderate (String, 1 characters ) 0
      sticky (String, 1 characters ) 0
      tnid (String, 1 characters ) 0
      translate (String, 1 characters ) 0
      vid (String, 2 characters ) 27
      revision_uid (String, 1 characters ) 3
      title (String, 12 characters ) Test Subject
      body (String, 20 characters ) <p>Test Message</p>
      teaser (String, 12 characters ) Test Message
      log (String, 0 characters )
      revision_timestamp (String, 10 characters ) 1234181594
      format (String, 1 characters ) 1
      name (String, 13 characters ) FirstName LastName
      picture (String, 54 characters ) sites/default/files/pictures/picture-fb_1187055...
          o
            sites/default/files/pictures/picture-fb_1187055300.jpg
      data (String, 399 characters ) a:7:{s:13:"form_build_id";s:37:"form-5e4e475084...
          o
            a:7:{s:13:"form_build_id";s:37:"form-5e4e475084de02291ed4563d6dda753b";s:14:"picture_delete";i:0;s:14:"picture_upload";s:0:"";s:7:"contact";i:1;s:19:"friendfeed_username";s:0:"";s:14:"friendfeed_key";s:0:"";s:23:"friendfeed_contenttypes";a:11:{i:1;i:1;i:0;i:1;s:4:"blog";b:0;s:4:"book";b:0;s:3:"faq";b:0;s:4:"feed";b:0;s:5:"forum";b:0;s:5:"image";b:0;s:4:"page";b:0;s:4:"poll";b:0;s:5:"story";b:0;}}
      tid (String, 1 characters ) 2
      realname_save (String, 13 characters ) firstname.lastname
      realname (String, 13 characters ) FirstName LastName
      homepage (NULL)
      last_comment_timestamp (String, 10 characters ) 1234181594
      last_comment_name (NULL)
      comment_count (String, 1 characters ) 0
      taxonomy (Array, 1 element)
          o
            2 (Object) stdClass
                +
                  tid (String, 1 characters ) 2
                +
                  vid (String, 1 characters ) 1
                +
                  name (String, 7 characters ) General
                +
                  description (String, 38 characters ) We welcome our guests to discuss here.
                +
                  weight (String, 1 characters ) 0
      files (Array, 0 elements)
      iid (Boolean) FALSE
      locations (Array, 0 elements)
      location (Array, 0 elements)
      forum_tid (String, 1 characters ) 2
      build_mode (Integer) 0
      readmore (Boolean) FALSE
      content (Array, 2 elements)
          o
            body (Array, 2 elements)
                +
                  #value (String, 20 characters ) <p>Test Message</p>
                +
                  #weight (Integer) 0
          o
            locations (Array, 3 elements)
                +
                  #type (String, 6 characters ) markup
                +
                  #value (String, 0 characters )
                +
                  #weight (String, 1 characters ) 0

I don't see any DNA.

mizerydearia’s picture

After giving devel module permissions for my test user, I still am unable to access the node.

"You are not authorized to access this page."

Giving all permissions to all users for forums module I still am unable to gain access with my test user.

salvis’s picture

Yes, DNA won't make the node visible for your test user, so you can't see the DNA information as the test user, but you should see it as user 1 at the bottom of the node/27 page.

Have you enabled the separate devel_node_access module (part of the Devel module)?

Did you find the checkbox labelled "Devel Node Access debug mode" on the

admin/settings/devel#edit-devel-node-access-debug-mode

page?

Would you do me a big favor? Please try to observe yourself and (when you'll have found the DNA information) tell me why you haven't found it from the start. Obviously, it's not as easy as I think it is, and I'd like to improve my instructions so that they would work for you immediately.

mizerydearia’s picture

"Would you do me a big favor? Please try to observe yourself and (when you'll have found the DNA information)..."

Definitely!

- I go to admin/build/modules
- I see "Development" module section.
- "Devel 6.x-1.14" is enabled (I enabled this just in case it was necessary since the first time I ignored it since I noticed it wasn't required by "Devel node access")
- "Devel node access 6.x-1.14" is enabled
- I go to admin/settings/devel#edit-devel-node-access-debug-mode
- "Devel Node Access debug mode" is selected/checked.
- Next, although I haven't made any changed, I view a node to see how it appears.
- Other than the expected "View," "Edit," "Outline," and "Track" that I normally see I also see "Dev load" and "Dev render" tabs.
- As I am using Firefox 3.0.x, ctrl+f and type "DNA" (with Match case deselected/unchecked) and do not find any matches.

More...

- I backtrack to admin/build/modules
- I scroll down to "Development" module section.
- I also enable "Devel generate 6.x-1.14," "Macro 6.x-1.14," "Performance Logging 6.x-1.14" and "Theme developer 6.x-1.14" ignoring "GMap Debugging" and "Location Generate" as I deem them completely unnecessary.
- I go to admin/settings/devel and review all options (even though they aren't mentioned in the directions)

_ Collect query info
_ Display query info
Sort query log: by source
Slow query highlighting: 5
_ Store executed queries
Sampling interval: 1
API Site: api.drupal.org
_ Display page timer
_ Display memory usage
_ Display redirection page
_ Display form element keys and weights
Krumo display: default
X Devel Node Access debug mode
SMTP Library: Default
Error handler: Standard drupal

- I then check again a node and still no "DNA
- I view the "Dev load" tab and expand all elements, no "DNA"
- I view the "Dev render" tab and expand all elements, no "DNA"

salvis’s picture

You shouldn't need any Development modules besides DNA, not even Devel. The "Dev xxx" tabs are unrelated.

I thought this was done automatically, but now I'm beginning to suspect that the DNA block is not enabled — go to admin/build/block and make sure it's in the Footer region. While you're there, you can also enable the DNA by User block.

Oh, and go to admin/user/permissions and grant the view devel_node_access information permission.

mizerydearia’s picture

gah... After posting here previously I realized DNA also represents Devel Node Access but I didn't realize until now that maybe searching for or seeing "dna" anywhere on the page isn't what I should be looking for.

I also didn't realize to scroll to the bottom of the page, but now that you mention "footer" I looked at the bottom of the page... and there was information I hadn't noticed previously.

I suppose a simple update to the rules to inform users to check the footer of the page for the information will be helpful.

Thanks! and sorry for consuming much of your time towards this realization, although I hope it is helpful for future cases.

Okay, so now onto my original post...

Viewing a node consisting of a thread that was posted to a forum in which an authenticated user, after having posting the thread, was unable to access it or see its existence in a forum that they have access to see and view threads that exist in it, but no threads appear to the user. Viewing teh same forum with admin user/1 shows the threads. One of those threads with dna info shows the following:

http://i40.tinypic.com/21l2a84.png
Updated: http://i39.tinypic.com/id5frc.png

I notice my test user does not have access to view.
Here are Permissions I have set for forum module: http://i41.tinypic.com/v8pnvq.png

mizerydearia’s picture

I did something kind of extreme, but I wanted to be 100% certain.

I enabled ALL (every single one) permissions for anonymous and then refreshed the forum thread posting node with user/1 admin and anonymous was able to view, update and delete. Yay!

I then disabled ONLY node/administer nodes.. Everything else was still enabled. I then refereshed the forum thread posting node with user/1 admin and anonymous was no longer able to view. How strange.

I believe that implies there is a bug with the forum_access module. Is this accurate?

salvis’s picture

Thanks for sharing your insight into your confusion. I've tuned the 'Create new issue' text to hopefully be more clear.

Why do you have a priority of -10? As the DNA information shows, the Forum Access (FA) grants are ignored (because their priority is lower than ACL's).

That -10 is a misconfiguration on your part. Why did you set it that way?

ACL's priority should be the same as FA's. This is a bug, but I need to study it in depth to come up with a fix.

I then disabled ONLY node/administer nodes.. Everything else was still enabled. I then refereshed the forum thread posting node with user/1 admin and anonymous was no longer able to view. How strange.

I believe that implies there is a bug with the forum_access module. Is this accurate?

No. As DNA shows, the grants that would provide View access are ignored. The result is that no one has View access, except for user 1 and users with the administer nodes permission. This part is working as intended.

Change FA's priority to 0 — now things should start working as expected. Look at the DNA information to see what it should look like.

mizerydearia’s picture

Aha! Thanks! Fixed!

salvis’s picture

Status: Postponed (maintainer needs more info) » Fixed

Ok, good.

salvis’s picture

Category: support » bug

I just committed the fix that will make your configuration work, too.

ACL's priority would now be -10 as well, so that FA's grants would be used.

(I've also updated FA so that the Priority field is not shown anymore unless you have more than one node access module installed. So if you have yesterday's FA (or later), don't be surprised to not find this field anymore.)

Status: Fixed » Closed (fixed)

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