[Solved] Default page doesn't accept relative URL

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
sedroca's picture

My OpenScholar site consists of a department site and subsites under it for lines of research, facilities and faculty, researchers and students.

Rather than have the site-url go to the standard OpenScholar login at http://site-url/home I wanted it to go to the department site which is at site-url/department.

It seemed from reading that what I wanted to do was change the default home page.

Admin/Configuration/System:Site-information has a section called Front Page which shows the default front page.
Mine was the default value of "home." The line below it has a link to where this can be set.

http://site-url/home
The front page is controlled by the spaces module and can be set here. 

So I clicked on "here" (here = site-url/features).

At the bottom of this /features page is a section called "Default front page" and has an entry which holds the current default page "home"

home
A relative path to use as the front page.

As the page I wished to be the default page for site-url was /department I replaced "home" with "department" and pressed "save configuration."

department
A relative path to use as the front page.

Unfortunately this generated an error "Invalid front page selected."

This was a big mystery as to why "home" was acceptable while "department" was not.

I thought it was my login, but no I was logged in as user1 and so should have super powers.
I thought maybe it needed "/department".  No.
Maybe it needs a full "http://site-url/department".  No.

Reading old drupal postings which deal more in node/# for page names than readable URL's it occured to me that perhaps the "node/#" notation rather than "department" might work.

But how do I find out the "#"?

Admin/Configuration/Search-and-metadata:URL-aliases showed node/# values for many pages, but not the page I wanted.

So I started a brute force approach in the URL bar:

http://site-url/node/1    No (this is home)
http://site-url/node/2    Ok!!  

What good luck, it was the second one.

Now, back to "here" I put "node/2" into the default home page as:

node/2
A relative path to use as the front page.

and "save configuration"

This time it was accepted.
Now http://site-url goes directly to http://site-url/department.

Comments

awesome - thats a cracker !

prabhu9484's picture

awesome - thats a cracker !

OpenScholar

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: