My website is showing the wrong count of items for each FAQ category on /faq-page. It is showing a count of 1 for every category, even though there are more than one under each. If I log in as the super-admin user (uid 1), it changes and shows the correct counts for each category. However, viewing the page as anonymous or a non-admin user, it shows 1 again.

Comments

stella’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

Can you provide a link to the site where this happens? I imagine the problem is that the questions that aren't appearing are either unpublished or the user does not have the necessary permissions to access them. This could happen if you're using an access control module such as Taxonomy Access Control or Content Access. Can you check if the user can see the question nodes themselves?

jlea9378’s picture

Status: Postponed (maintainer needs more info) » Active

http://web.clatsopcc.edu:8000/faq-page

I tested it while logged out (anonymously) and I was able to access the FAQ pages. We are indeed using the Content Access module though.

Content Access 7.x-1.x-dev (2011-Nov-30)
Frequently Asked Questions 7.x-1.0-rc1+13-dev (2012-Feb-06)
FAQ_Ask 7.x-1.x-dev (2012-Jan-03)
Drupal core 7.12

stella’s picture

Status: Active » Postponed (maintainer needs more info)

I'm finding it difficult to reproduce here. Can you provide more details or perhaps screenshots of your faq settings?

jlea9378’s picture

Status: Postponed (maintainer needs more info) » Active
StatusFileSize
new49.8 KB
new91.2 KB
new81.24 KB
new99.53 KB
new1.04 MB

I've attached a zip file containing screenshots of my configuration.

I've also attached a screenshot of what the admin user (uid1) sees at:
http://web.clatsopcc.edu:8000/faq-page

And screenshots of what an anonymous user sees at:
http://web.clatsopcc.edu:8000/faq-page
as well as screenshots of what an anonymous users sees if he/she clicks down to view a FAQ page.

stella’s picture

Hmm I still can't reproduce it. I've duplicated the FAQ module settings here but it still works fine. If you can set up a test version of the site, I'd try disabling the Content Access module (and rebuild node permissions) to see if that fixes it. If not, then try disabling the FAQ Ask module but I doubt that would cause it.

stella’s picture

Status: Active » Postponed (maintainer needs more info)

changed status

jlea9378’s picture

Status: Postponed (maintainer needs more info) » Active

The ACL module and the Content Access module both cause this problem. Disabling one or the other didn't solve the problem. However, disabling both modules solved the problem. Any idea how to solve the problem? Disabling Content Access and ACL isn't an option for us.

The other access control module I have installed, User Permissions, is not a factor in the problem from what I can tell. FAQ Ask was disabled while testing since the module is broken for me at the moment.

Here are the versions I am using:
drupal 7.12
Frequently Asked Questions 7.x-1.0-rc1+13-dev (2012-Feb-06)
ACL 7.x-1.0
Content Access 7.x-1.x-dev (2011-Nov-30)

Thanks.

stella’s picture

Project: Frequently Asked Questions » Content Access
Component: User interface » Code

This problem occurs with only content_access module enabled as soon as you rebuild the node permissions. ACL module not required to reproduce it.

Anyway, this is pointing to a problem with the content_access module as the faq module has added the correct "node_access" tag to the query as described at http://drupal.org/node/310077

For content access maintainer, the query in question is:

      $query = db_select('node', 'n');
      $ti_alias = $query->innerJoin('taxonomy_index', 'ti', '(n.nid = %alias.nid)');
      $term_node_count = $query
        ->condition('n.status', 1)
        ->condition('n.type', 'faq')
        ->condition("{$ti_alias}.tid", $term->tid)
        ->addTag('node_access')
        ->countQuery()
        ->execute()
        ->fetchField();

As soon as I enable the module and rebuild the permissions, keeping the default configuration where anonymous and authenticated users can access the nodes, the count of the nodes visible by taxonomy term is always 1.

I've tested with both the 7.x-1.2-beta1 release and the latest dev release.

jlea9378’s picture

any update on this??

trillex’s picture

This might be a duplicate of #1115794: Conflict with views module.

gisle’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This issue has not received any updates in the previous 8 years. If you believe it to still be relevant, you are encouraged to reopen the issue and update it.

If you got an email about this Issue status update, it is because you at one time (possibly a very long time ago), subscribed to it. To learn how to unsubscribe yourself, please visit: https://www.drupal.org/project/webmasters/issues/3142987