Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By ilijapasoski on
Hello, i am new to Drupal, and i've been trying to make a web page using Panel and Views modules. I have problem with access control. I want authenticated and anonymous users to see all the data, but i can't do it. Only when i put in access control that they can ADMINISTER NODES they are able to see all the data. If anyone can help me to solve this problem? Thanks
Comments
This is node data, correct?
This is node data, correct? And users can 'access content'>
It may be that your {node_access} table is corrupt. This is fairly common.
If you are _not_ using any access control modules, take a look at the {node_access} table. It should contain exactly one row:
If this row does _not_ exist, only users with the 'administer nodes' permission can view content.
--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.
Thanks a lot for the answer.
Thanks a lot for the answer. Sorry, i don't understand what do u mean by question "This is node data".
My idea is for everyone to see all the content as i said, and i am not using any access control modules.
I was looking into directory modules/node, file node.module, and the only code with the row that you wrote was this, i don't know if that is the place where i should look???
OK. In Drupal terms, node
OK. In Drupal terms, node == content. If you post a page, it is node/XXX (this Drupal.org page, for example, is node 197878).
As for the {node_access} table, I mean "does it exist in your database."
We don't need to be looking through code. I suspect you have a minor database issue.
Do you have access to your database tables? Look in the {node_access} table. It must have the row that I mentioned. If it doesn't, run the query:
if you are using table prefixing, you will need to change the tablename as needed.
--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.
Sorry, didn't understand you
Sorry, didn't understand you the first time, now i do. Yeah, i opened a database, found a table {node_access}, and there is the same row that u mentioned, but the values are slightly different.
This is what i get:
Is that ok, or i should still Insert the line that you wrote into the table of database?
Thanks again!
Change it
OK. Now we are making progress. That line means:
"Show node 3 and only node 3 to all users."
Something in your installation changed the default node access record and is denying access to most of your content. Perhaps you enabled a module such as OG?
Run this SQL and your site will go back to normal:
If you are interested in the technical details of why this happens, see http://api.drupal.org/api/function/node_access/5 and http://api.drupal.org/api/group/node_access/5.
--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.
IT WORKS!!!! Thanks a lot
IT WORKS!!!!
Thanks a lot really, i would have never fixed this problem on my own with this much knowledge of Drupal!!!
Not a problem
If it makes you feel any better, this issue pops up quite frequently and confuses lots of people.
If your content ever 'disappears' check your node access table.
--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.