Drupal relies on Node to provide a front page, unless the administrator decides to use another page. This patch removes this dependency in preparation of #375397: Make Node module optional. The configuration help text people see right after installation is moved to common.inc. It is being displayed if no front page has been defined .Node returns "No nodes have yet been promoted." if people visit /node and if no nodes have been promoted.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch failed testing.

Xano’s picture

Status: Needs work » Needs review
FileSize
13.2 KB

The system.test tests now pass. I replaced drupalPost() (which caused errors for some reason) for setting variables with variable_set(), which is faster.

Status: Needs review » Needs work

The last submitted patch failed testing.

Xano’s picture

Status: Needs work » Needs review
FileSize
11.89 KB

Converted variable_set() back to drupalPost() and fixed the fails.

tstoeckler’s picture

Status: Needs review » Needs work

It works as it should, the front page works now together with the patch in #375397: Make Node module optional.
I know it's correct behaviour, but it's weird for Drupal to tell me that "The path 'node' is either invalid or you do not have access to it."... :-)

Xano’s picture

Status: Needs work » Needs review

Just so I can get a quick overview of which tests fail and which don't :)

Status: Needs review » Needs work

The last submitted patch failed testing.

catch’s picture

Seems like the welcome text is the sort of thing which should live in system module rather than common.inc

I think either the default profile, or node_module in hook_install() should set that variable to be 'node' if it's empty. Having to go to admin/settings/site-information before you can get /anything/ on your front page and remove the message would be nightmarish.

Xano’s picture

True, but then the help message would never be displayed at all and you would see "No nodes have yet been promoted." right after installation. Not a good thing, IMO. Also, I'd like to get rid of Node in the Expert profile (in another issue) and therefore I don't want to do things that would make that change harder to get committed.

tstoeckler’s picture

Maybe it would be good to let the default welcome text be defined by the install profile.
Having the default welcome text in the expert profile, e.g., is completely worthless (though it's not troubling). There should be totally different links and text or maybe even a direct redirect to /admin.
Also if you install Acquia Drupal, you see that they actually create a node for you which is promoted by default, in an attempt to copy this behaviour.
This is merely a theoretical proposal, I have neither the skills to implement it, nor can I judge whether this is even achievable.
Would like to hear your thoughts!

catch’s picture

To be honest, I think replacing the welcome page with 'Oi, post some content' would be decent change in itself, but probably out of scope.

Xano’s picture

People are working on the welcome text already and also because it is indeed out of scope I don't want to change more than necessary. See #295369: Welcome message re-ordering and #325893: UX: Persistent messages at /admin.

Some of the tests fail, because with this patch blocks aren't rendered at the front page and I cannot find out why.

Xano’s picture

Slight code cleanup. I believe the blocks problem lies somewhere beneath drupal_render(). drupal_get_page() and drupal_render_page() seem to work allright. If you check menu_execute_active_handler() after this patch, you'll notice the addition of the front_page_help() call. If you replace the call to call_user_func_array() for regular callbacks with this function, you will notice that blocks _are_ rendered and this is not a bug in front_page_help().

yoroy’s picture

have a look at http://drupal.org/node/126221#comment-1269590 and below, there seems to be some overlap

Xano’s picture

Status: Needs work » Closed (duplicate)

Marked as duplicate of #126221: Make 'node' empty text themable. since it seemed sensible to merge both issues and that one was far busier.

Xano’s picture

Assigned: Xano » Unassigned