Hi.
I install the RC3 and found out nevertheless a user roll has a 'administer nodes' permission, he cant see any content in site main page and having the message of "Welcome to your new Drupal-powered website....". surly not all users should have this permission. What to do ?

Comments

Rosethorn’s picture

Have you made a content post to the site yet? That message is what you see until a post is made.

Was he the first person to register? If so, he'll have superadmin powers.

fatfish’s picture

and administrator and few roles and users.
The thing is no user accept the one with administer nodes permission can see any content.

..:| Tomer Fish |:..
fatFish - Lean Mean Coding Machine

Rosethorn’s picture

In access controls, make sure you have access content checkmarked across the board. Otherwise, no one can see your content.

Also, check your access controls for that users access -- whatever it is set at -- and make sure that user role doesnt' ahve anything unusual assigned to it.

Check in the user area to make sure that user doesn't have administrator status assigned to him as well.

venkat-rk’s picture

That is strange. I just installed rc3 and I don't have this problem for anonymous users.

fatfish’s picture

Does the db_num_rows($result) got anything to do with permissions ?

function node_page_default() {
  $result = pager_query(db_rewrite_sql('SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.promote = 1 AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'), variable_get('default_nodes_main', 10));
  if (db_num_rows($result)) {
    //
    // display nodes
  }
  else {
    $output = t("<p>Welcome to your new Drupal powered website. ...);
  }
  return $output;
}

now - there is no call for any access functions in any of these processes.

..:| Tomer Fish |:..
fatFish - Lean Mean Coding Machine

kevinwalsh’s picture

reposted from 59069 (fatfish and i posted almost simultaneously)

I just upgraded from 4.6 to 4.7 RC3, and now certain users cannot access content at all, and they only see the "welcome to Drupal" page.

The pattern does not seem to have anything to do with the settings in Access Control, since it includes both anonymous users who have permissions to access content, and a "worker" role that has permissions to do much more than that. I think what determines whether or not they can access content is if they had ever logged in on the 4.6.6.

kevinwalsh’s picture

i have since noticed that if i turn on "administer nodes" across the board, anon users can then access content. but this is obviously more permission than they should have.

wpd’s picture

The code works because many people are using it including drupal.org, so I would look at site specific customizations and problems with the upgrade.
What modules are you using?
Did the upgrade run without errors?

You may want to look at the access control settings in the database to make sure there are not duplicate rows or other suspicious data.
I would also try unchecking the 'access content' permission and saving. Then re-select your permissions and save again.

White Paper Designs

kevinwalsh’s picture

try unchecking the 'access content' permission and saving. Then re-select your permissions and save again.

No luck with this. Nor did i see suspicious data/duplicate rows, though i don't really know what i would be looking for.

Steve@anthrofiction.com’s picture

The problem with my site having this problem was that there was no record in the node_access table. When I added a record with the following:

nid = 0
gid = 0
realm = all
grant_view = 1
grant_update = 0
grant_delete = 0

Once I did this the initial page display problem for anonymous users went away.

Hope this helps anyone who is also having this problem.

Steve

kevinwalsh’s picture

worked for me too.

fatfish’s picture

Is worth checking if the organic group module is causing that row to disappear.

..:| Tomer Fish |:..
fatFish - Lean Mean Coding Machine

jase951’s picture

Worked for me too!

remocrevo’s picture

Just installed drupal 5.0, using Organic Groups (haven't confirmed that caused the problem, though), and the above fix worked for me. Thanks!

lelizondo’s picture

I have a site and I had the same problem but I'm not using OG so it's not the problem, at least not for me. Anyway, the solution worked for me.

Using drupal 5.5

Luis

Luis

ChristieLuv’s picture

Many thanks! This worked for me too with Drupal 5.7!

torgospizza’s picture

This solution worked for me as well. At one point I had enabled the Domain access control module, which deletes that exact item from the node_access table. I'd forgotten about that. Many thanks!

Have I helped you? Consider buying me a beer.

LordVader’s picture

This worked for me with Drupal 5.3. The nid 0 record was missing, despite there being many others.

You saved my site, thank you very much :)

ingola’s picture

i had the same problem: nobody couldn't seen any content without administer nodes permission
solution: if you have organic group turn it on :)

--
penna2001