Under administration, I removed all of the check boxes for the Anonymous user so that only people who are logged in can see content. However, if you are not logged in and view the main page, it says "Page Not Found" above the mission statement. This isn't a big deal but I'm just wondering if there is something I can do to remove this message (like create the page it cannot find).

Thanks,

James
lamb0176@umn.edu

Comments

Dublin Drupaller’s picture

Hiya Lamb.

I came up with a short piece of code that automatically pushes a user when there is not just a 404 error (file not found) but other errors as well...such as when they try to access a page that requires login (which used to display an error message on my server).

the code also automatically emails the drupal administrator (or a predetermined email address) that an error has occured.

Here's a link to my post explaining it.

http://drupal.org/node/7570#comment-11550

I have setup a "catch all Error Page" for a drupal demo site that lists "Probable causes..such as not logged in, login session timed out for some reason, page no longer exists etc." with a Login form where users can login again, reuqest new password, create a new account or email for support.

I hope it helps.

Jason

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

lamb0176 at umn dot edu’s picture

That looks like a good idea for all errors but I was wondering about this one specifically. The website is http://www.jameslamberg.com/ then click the Drupal icon near the bottom. You'll see the "Page not found" error at the top. Any ideas what is causing this when the Anonymous user has no capabilities and maybe how to get rid of the message or create the file so it says "Register To View Content" or something?

Dublin Drupaller’s picture

I see what you mean.

Have u tried using the front.module? not sure if it has been upgraded for 4.5, but worth trying.

Alternatively, as a crude workaround, you sould VIEW SOURCE on the first page you get when you click on the drupal icon underneath the intro at your site and do the following:

1. Edit out the PAGE NOT FOUND text using a HTML editor

2. Add in some more helpful text/images if you think the page needs it

3. Save it as LOGIN.HTML

4. Upload it to your server.

5. Change the link on the drupal icon below your intro to point to LOGIN.HTML

That make any sense?

It's a crude workaround, but it will solve the problem.

Alternatively you could edit the string..using locale/localisation. but i'm not sure if thats a good idea.

Hope that helps anyway..

Jason

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

lamb0176 at umn dot edu’s picture

quite crude... but works :)