Messages displayed to users without permission to view content is misleading and confusing. The way Drupal handles this is less than useful, as well. There ought to be some sort of default message that can be administratively chosen to be displayed to these users. For example, a "node zero" which the administrator would fill with text which describes what to do (create an account, log in with existing account, or maybe just go away if the site is totally private).

See attached screen shot for a clean install of the CVS from this evening (Jan. 19 in North America). Note the bold message "Page not found"

The page is just fine -- it's just not "finding" any content nodes to display.

I think common.inc::drupal_not_found() is the culprit.

CommentFileSizeAuthor
#18 welcome.patch2.36 KBChris Johnson
Install.gif7.91 KBChris Johnson

Comments

Bèr Kessels’s picture

I like the idea of the node 0.
It would be quite consistant with the user 0, who is a kind of 'default' user.
However, it will be much more difficault to implement this, instead of a simple 'admin-option' with variable_[g|s]et()

dries’s picture

Title: No permission to view node handling is poor » Good welcome message needed

I fixed the 'Page not found' problem in HEAD, though the MSSQL database scheme needs to be updated.

Next, if someone writes a good welcome message I'll make Drupal displays that.

dries’s picture

Category: bug » task
Chris Johnson’s picture

I'll be happy to write a welcome message.

Although this set of changes fixes the problem for new installations -- by giving anonymous users default access to content -- it doesn't fix the same problem when it occurs because an admin has intentionally removed access content for anonymous users.

In the latter case, not only do the anon users get the "Page not found" message, they also now seem to get a PHP error:

warning: Cannot modify header information - headers already sent by (output started at /home/cms/dev-drupal/modules/user.module:1793) in /home/cms/dev-drupal/includes/common.inc on line 226.
Chris Johnson’s picture

Suggested welcome message:

t('Welcome to the %Drupalpowered %sitename web site.  Depending on how the administrator has configured this site, you may have access to a various content and features.  You may be able to create a new account or login with an existing one using a form and links which may appear on this page.  This is the default welcome message for anonymous users.', array('%Drupalpowered' => '<a href="http://www.drupal.org/">Drupal-powered</a>', '%sitename' => variable_get("site_name", "")));

Ideally this message could be customized for each site via an administration option. I'll be happy to work on improving this message based on feedback. It's just a first rough draft.

Chris Johnson’s picture

Hmm, with a clean install, I do not get the PHP error messages. That was from an upgrade from a previous CVS version.

I still see the "Page not found" with a clean install when I remove "access content" permission for anonymous users. Is this where the suggested welcome message would go? That would be ideal.

dries’s picture

Not sure about the message. The target audience is he or she who just installed Drupal. The message will go away after the first node is posted.

Chris Johnson’s picture

Assigned: Unassigned » Chris Johnson

Ah, ok. I wasn't sure who the audience would be as I was not sure how you were going to code the logic which displayed it.

I will come up with a better welcome message targeted specifically at the person who just installed Drupal.

..chris

irwin’s picture

May I suggest that, in the opening page, you post some instructions/guidance on how to use the Taxonomy terms?

This feature is probably one of the most easily overlooked features in Drupal. I don't think the majority of users or site owners really understand what it is or how to use it.

(Aside: a good taxonomy tutorial could be beneficial to the Documentation as well. *makes mental note*)

Brian@brianpuccio.net’s picture

There already is (imHo) a great taxonomy guide in the Handbook

Chris Johnson’s picture

In thinking about this welcome message, I was initially thinking about what the installing administrator would first see upon trying his new site out immediately after the install. That presented somewhat of a security concern, as the first user that is created becomes the super-administrator.

Dries writes that this welcome message will continue to be diplayed until the first node is posted. Typically the administrator would post the first node, and I would imagine it would be some sort of introductory message in and of itself.

So is the welcome message that I propose to write one which should consider the first users the primary audience, welcoming them to the nascent site? Or should it consider the administrator(s) the primary audience, giving them some hints and links about how to make Drupal work for them?

I would appreciate any suggestions.

Chris Johnson’s picture

Never mind. I re-read all the messages and it seems clear the audience is the administrator who installed the site.

That said, I'll come up with another draft.

dries’s picture

I'd welcome the installing administrator and briefly explain him the next step(s).

Maybe take a look at the welcome messages of the CMSes installed at http://opensourcecms.com/?

Steven’s picture

By the way, please remember the proper syntax for links inside t() strings is:

t("Please visit the <a href="%admin">admin page</a>.", array("%admin" => url("admin")));
dries’s picture

Assigned: Chris Johnson » dries

Steven has written a good welcome message (communicated in private) which I integrated into the node module. I'm marking this report 'fixed', yet refinements are always welcomed.

Chris Johnson’s picture

Steven's message is pretty good and close to what I was crafting.

I suggest the added paragraph (in the attached patch) highlighting the taxonomy system, as it is often misunderstood and under utilized.

dries’s picture

You did not attach a patch.

Chris Johnson’s picture

StatusFileSize
new2.36 KB

My apologies for wasting your by apparently forgetting to attach the patch. It is attached this time.

Hmmm, on my first preview with the patch file attachment specified, the preview form continued to give me the no prior attachment message. Upon retrying, now I get the "A file already exits, if you upload another file the current file will be replaced" message that I expected on the first preview. Maybe that explains where my patch went on my previous posting.

dries’s picture

Not sure how helpful the suggested taxonomy snippet is. It might actually be confusing/overwhelming.

Chris Johnson’s picture

Your call.

Someone else had commented on how underused the taxonomy system was by many Drupal site operators. It was suggested that many people were unaware of how many different ways taxonomy can be used to make a site more useful and powerful.

My patch was an attempt to improve that situation by getting new admins to learn about it. Perhaps it is too confusing. Maybe a section in the Handbook that gives examples of how to do various common CMS tasks, including some which use taxonomy to implement would be better.

dries’s picture

Anonymous’s picture