Ok, here's what I'd like to do.

For an annonymous user visiting my site I'd like them to see a static front page, with login fields off to the side. Once they log in they then get access to the frontpage with the latest updates from across the site displayed.

I've created a page and added it to the content block, that part's cool. However if I set the permissions such that only authenticated users can view the frontpage content then I get a block which says:

Access denied

You are not authorized to access this page.

So how do I get rid of that ?

Comments

removemeplease’s picture

I'm assuming you have unchecked the "access content" box on the node module user management. To be honest I haven't really thought this through but couldn't you copy page.tpl.php and call it page-front.tpl.php then just replace $content with static (HTML) content.

--------------------------------------------------
Martin - Pedigree Music - Drupal Powered Music Blog

ste5eu’s picture

Yes, but as mentioned the problem with no access is that you get the no access message. The problem with replacing the code in the template file is that when you do log in you don't get the data either.

Thanks for the thought though, I'm gonna investigate the frontpage module mentioned in one of the other responses.

aireworth’s picture

Have you gone to Administer->Site Configuration->Error Reporting and set the default 403 page to point to your new page? Still reports as an error in the error logs, but the anonymous user only sees your new page.

ste5eu’s picture

No, but if I do that then I get my new homepage for all no access errors.

yelvington’s picture

If you want to serve different content to logged-in and unauthenticated users, install the front page module.

ste5eu’s picture

I'll check this out at the weekend as it sounds like it may be the best option.

Thanks all for your responses.

The error actually appears to occur for all non admin users. I'll post the fix here for future reference when I have it.

chlobe’s picture

I had a similar problem and found that after rebuilding the permissions it was resolved.

ste5eu’s picture

When you say rebuild them what do you mean ? Remove them then reapply through the admin interface, or something more ?

chlobe’s picture

go to

http://your_site_url/?q=admin/content/node-settings/rebuild

Rebuild permissions through the site interface above. If still having problems you may need to optimise the relevant database table and that is beyond me but I have seen several posts describing how.

Hope it helps

Marco Palmero’s picture

You know what's funny?

this did happen to me. I use the page-front.tpl.php solution and for some reason "access denied" pops up...

For a few minutes when I access my site it says that... after a few minutes its back to normal... is that some sort of throttling going on?

ste5eu’s picture

The front page module does exactly what I need.

Thanks all for your help.