I have already reported this problem on the node privacy by role page as it has the same issue.
I have built a site with several basic pages and several views pages. I am trying to use this module to restrict access to one of the basic pages. Unfortunately it seems to partially restrict access to my views pages as well. Anonymous users can only see the first page of results on all the views pages. They cant see the pager and therefore cant get to the next pages.
I am quite new to Drupal, so this could be something i have done wrong, but I am quite sure it's not.
Please, if anyone can help me it would be much appreciated.
Rory
Comments
Comment #1
Waldknoblauch CreditAttribution: Waldknoblauch commentedI habe the same problem with views ...
Comment #2
aocoder CreditAttribution: aocoder commentedI'm having a similar issue in 7.x. Right now, I have content access set to allow access to nodes for any user. This works fine, and anonymous users are able to access any of this content. However, I have a view that lists these nodes, and this view is empty for anonymous users.
Comment #3
SNaKeMe CreditAttribution: SNaKeMe commentedSame here.
Comment #4
BenK CreditAttribution: BenK commentedSubscribing
Comment #5
good_man CreditAttribution: good_man commentedrelated issue IMO #1057400: Taxonomy access tried to figure out where this bug occurs, unfortunately couldn't, seems I'm so sleepy, will try later.
Comment #6
good_man CreditAttribution: good_man commentedcorrecting the tags.
Comment #7
SNaKeMe CreditAttribution: SNaKeMe commentedThe error occurs only when the pager is used. If Views is set to display all the items then the guest also see each element. Seems to be an error of views.
Comment #8
chrisgross CreditAttribution: chrisgross commentedI don't see how this is a problem with views. Here is my problem:
Before this module is installed, views works just fine. Before making any changes to permissions, views works fine. After changing content type access permissions, content is duplicated. After removing content type access permissions, content is still duplicated and can't be reverted.
Comment #9
commanderflash CreditAttribution: commanderflash commentedI am having the same issue. Unfortunately I am finding lots of bugs with the latest version of views related to contextual taxonomy filters. I do agree that it appears to to be an issue with this module though. If you disable it, the issue goes away.
Comment #10
bryrock CreditAttribution: bryrock commentedsame issue as #2.
Comment #11
enrikito CreditAttribution: enrikito commentedsame issue as #2 and #7
related? http://drupal.org/node/1094414
Comment #12
good_man CreditAttribution: good_man commentedI can't seem to reproduce it, please list the steps you did + the versions you used + test it on fresh Drupal installation.
@commanderflash: I'm hopping that [#1192196] will solve the issues with taxonomy.
Comment #13
BenK CreditAttribution: BenK commentedI also tried to reproduce this, but everything seems to work fine for me. Can someone who previously reported the error post steps to recreate?
I don't doubt there's a problem and I'd love to help find a fix today. The faster you list steps to reproduce, the faster it can be fixed! ;-)
--Ben
Comment #14
enrikito CreditAttribution: enrikito commentedDefault core modules 7.0
Content Access 7.x-1.x-dev
Chaos tools 7.x-1.0-alpha4
Views 7.x-3.0-beta3
- Create any taxonomy term
- Create 11 nodes, or more, and asign taxonomy term
- In Views, enable "Taxonomy term page"
If enable pager in View Taxonomy term, * anonymous user no show the content in taxonomy/term/%
(*) No "Bypass content access control" permission user
Comment #15
good_man CreditAttribution: good_man commentedThanks for the explanation, so I can understand that all who are affected by this bug used the taxonomy page? because there is a related issue here #1057400: Taxonomy access. If anyone has a similar bug without using taxonomy please report it here, otherwise we have to wait for that issue to be fixed.
Comment #16
enrikito CreditAttribution: enrikito commented...
If change order of "Contextual filters" in View Taxonomy term, the content is shown.
Comment #17
BenK CreditAttribution: BenK commented@enrikito: Thanks for posting your configuration. Can you try to upgrade your CTools and Views to the latest -dev versions of each and see if the problem persists? You're using older versions of CTools and Views and there have been a lot of bug fixes since then.
We should just rule that out first....
Thanks,
Ben
Comment #18
enrikito CreditAttribution: enrikito commentedsame behavior with:
Chaos tools 7.x-1.0-beta1
Views 7.x-3.0-rc1
* Reorder Contextual filters fixes the problem (temporarily)
Comment #19
karilu_ec CreditAttribution: karilu_ec commentedI run into the same issue as well. I have Drupal 7.1 with only Views 7.x-3.0-rc1, CTools 7.x-1.0-beta1 and Content Access 7.x-1.x-dev enabled. For testing purposes, I don't have any restrictions for the content types. When module content access is enabled the anonymous user cannot see the view with the taxonomy terms as contextual filters. If content access is disabled the view behave as expected.
I am attaching the view export. Is this still related to #1057400: Taxonomy access and some bug in the core as mentioned in one of the comments? the reordering of contextual filters didn't solve my problem. I have a hierarchy taxonomy vocabulary
Comment #20
good_man CreditAttribution: good_man commentedPlease don't remove the tags. I'm working hard to solve this problem very soon. Please stay tuned :)
Comment #21
good_man CreditAttribution: good_man commentedOkay guys, now Drupal 7.3 & 7.4 fixed that issue in core, I need you to retest, this bug now should be gone forever :)
Comment #22
karilu_ec CreditAttribution: karilu_ec commentedI am still having the same issues.
Drupal 7.4
Only modules enabled:
Views 7.x-3.0-rc1
Content access 7.x-1.x-dev (2011-Jun-25)
Chaos Tools Suite 7.x-1.0-beta1
I have a view that takes as contextual filters the taxonomy term with (depth). Only admin can see the view results but anonymous users only see the title and pager. If I disable content_access, the view behaves as expected both the admin and anonymous users can see the results.
Comment #23
good_man CreditAttribution: good_man commented@kaeilu: I can't reproduce, can you please try with a fresh installation of Drupal 7.3 or 7.4 and content access? also if the issue is still, provide me with more info like:
- What the expected behavior? and what is the buggy behavior you faced?
- How to reproduce. not just the view export, but also the steps you made so I can reproduce it on my machine and check the bug.
Comment #24
karilu_ec CreditAttribution: karilu_ec commented@good_man
I have Drupal 7.4, with only 3 modules enabled: Views 7.x-3.0-rc1, Content access 7.x-1.x-dev (2011-Jun-25), Chaos Tools Suite 7.x-1.0-beta1.
I created a taxonomy vocabulary with hierarchy like:
Vocabulary: Fruit
Terms: Sweet
-Grapes
-Strawberry
I added a field for my taxonomy vocabulary "Fruit" in the "Basic Page" content type. I added 5 pages that belong to grapes, and 4 pages that belong to strawberries. I am not restricting Content access for the Basic pages content type. So anonymous can view any content, as the authenticated user and administrator.
I then cloned the taxonomy term view, as later I want to create a variant for the taxonomy page.
In my view I changed the depth of the contextual filter Has taxonomy term ID (with depth) to 1, so when the contextual filter is 1 (sweet) it will retrieve all the children nodes for sweet fruit, so I am expecting the 5 pages of grape and 4 pages that belong to strawberry. If the contextual filter is 2 (grapes), it will retrieve all the nodes related to Grapes, etc.
I can see everything fine that while I am admin. However, if I see the view as an anonymous user I can't see the nodes. I just see the title of the term but not the related nodes. I set the pager to 4 items so when I see the view with contextual filter of 1 (sweet), I only see the title and the pager.
If I disable content_access. The view can be seen fine as anonymous and admin.
Let me know if you need anything else. I don't know if I am overlooking something.
Comment #25
good_man CreditAttribution: good_man commentedI can confirm this, but when I disabled content access I still can't see anything if I'm anonymous. did you make any workarounds or steps to solve it? this will help me detect the bug faster.
Comment #26
good_man CreditAttribution: good_man commentedOkay updating views to the latest dev (not rc1) fixed this, please update views and report back if it fixes this bug.
Comment #27
karilu_ec CreditAttribution: karilu_ec commentedI can confirm it. Views development version fixed it.
Comment #28
BenK CreditAttribution: BenK commented@karilu_ec: That's great news. Did you also have the related problem listed here http://drupal.org/node/1057400 ? Can you confirm that this problem is fixed as well?
--Ben
Comment #29
good_man CreditAttribution: good_man commentedComment #31
RedTop CreditAttribution: RedTop commentedSorry guys, issue comes up again for me. Doesn't seem to be fixed after all..
Drupal 7.12
Views 3.3
Content access 7.x-1.2-beta1 and 7.x-1.x-dev (2011-Dec-01)
Quite clearly an issue related to Content access. Disabling provides and immediate solution, re-enabling brings back the issue.
Comment #32
nambio CreditAttribution: nambio commentedAlso having this issue. Everything works fine with the module except some views seem to disappear. I'm currently testing to find out why some disappear but others do not, but the only ones which appear to disappear are those with restriction by role (a setting in place prior to content access being enabled site-wide).
EDIT: I did more troubleshooting and found the problem to be unrelated (the content was unpublished, hence only the admin view was working!). For anyone suffering a *real* problem, I would recommend rebuilding the view without any role/permission restrictions and see if that works. If it does work, then a potential workaround would be placing the public View inside an access-restricted Panel (something I was looking at doing before discovering my error).
Comment #33
Blooniverse CreditAttribution: Blooniverse commentedI can confirm this bug (Content Access 7.x-1.2-beta1 and Views 7.x-3.3).
Comment #34
csedax90 CreditAttribution: csedax90 commentedsame problem, Drupal 7.14 and Views 7.x-3.3... I've tried to change permissions to views and rebuilt all but seems it doesn't work...
Comment #35
j4 CreditAttribution: j4 commentedI also have this problem. Not related to taxonomy. Not even related to contextual filters. Views which is a listing of the nodes with the fields in it, was visible before content access was switched on and is now visible only to admin, even though the user with the right content access is able to view the nodes separately.
Thanks
Jaya
Comment #36
trillex CreditAttribution: trillex commentedI can confirm this as well with the latest dev releases of Views and Ctools. My issue is exactly as #35 is describing it.
Comment #37
SanFeda CreditAttribution: SanFeda commentedI have the same problem
Comment #38
mansspams CreditAttribution: mansspams commentedSimilar problem to #35. In my case I have a view that lists nodes that has entity reference field in them. With Content Access module enabled, and viewing as anonymous user, view lists only nodes in which entity reference field has value. Admin can see all nodes. It is clearly bug with permissions as only way I could get anonymous user see all view results is by granting 'Bypass content access control' to it (not cool).
Comment #39
dynamicdan CreditAttribution: dynamicdan commentedThis may help solve the issue:
The above is the (sub-query) SQL output from the View after enabling the 'admin views' settings for my test user. My content in question is deliberately unpublished but the owner should still be able to edit and access their own content (thus the 'view own unpublished content' option which is Drupal core (?).
When I save the item as published I have a valid entry in the node_access table. When not, I have no entries for the given node id.
So in short, the module is not inserting correct records into the node_access table (perhaps regardless of node access settings).
For the geeky, here's the full query un-edited:
Note: the initial SELECT looks bogus but doesn't seem to be a real problem.
Comment #40
bryrock CreditAttribution: bryrock commentedI did not remember stumbling into this problem over a year ago (#10), but have run into it again recently on several sites.
There is another quick work-around for this problem that does not involve disabling content access; you can select the "Disable SQL rewriting" option in the view's Query Settings, and the view will be visible to anonymous users.
Comment #41
JuliaKoelsch CreditAttribution: JuliaKoelsch commented@bryrock Thank you so much!!! You saved me a lot of time. I forgot about that setting in views.
Comment #42
mattsmith3 CreditAttribution: mattsmith3 commentedI'm having this issue too. Some views only show certain content- which is odd because I do not have the per content setting enabled. Some views show no content- which (again) is odd because I have the roles all configured per this content type. This module does not seem to be working with views for me at all.
Comment #43
Rhodungeon CreditAttribution: Rhodungeon commentedSame problem here... I have a single content type restricted to registered users and some views using its fields. Anonymous users can't see such views if content access is enabled.
Comment #44
bedlamI can confirm that #40 works. Seems definitely to be a problem related to content_access.
-- b
Comment #45
cobaltje CreditAttribution: cobaltje commented#40 - works, but every userrol can acces the view then.. and thats not supposed to.
Comment #46
bkosborneCan anyone with the problem look at the patch here: #1225520: Add 'View own unpublished content' setting. Content Access currently doesn't support the core permission "view own unpublished content". While viewing the node directly would still work if a user had that permission, anything that lists the content (like Views or a custom query tagged with node access) will not display it. That patch should address the issue by adding a realm in the node_access table that grants access to the owner of unpublished content to view it.
Comment #47
fagoConflicts with views occur probably due to the node query rewriting core pursues for us. Content access just uses the API to expose the grants. For any sql-troubles please lookup the core and or views issue queues as that's something general to all node access modules.
Comment #48
druderman CreditAttribution: druderman commented#40 will work for me. Then I plan to protect the View via Apache configuration.
Comment #49
Sinan Erdem CreditAttribution: Sinan Erdem commentedI believe this issue is related with a core bug explained and solved in this issue: https://www.drupal.org/node/1349080#comment-10953027
My views didnt respect content access permissions and werent showing nodes to users. After applying the patch, it is working correctly now.