Closed (fixed)
Project:
Front Page
Version:
5.x-1.9
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
9 Jan 2008 at 07:20 UTC
Updated:
2 Jan 2009 at 12:00 UTC
I am using the frontpage module to force all users to login prior to accessing my site and have incorporated the
following code in the html but cannot figure out how have the users redirected to www.site.com/node instead of www.site.com/user.
I have set the "Redirect link to: "www.site.com/node" but this does not work. How can I get around this?
Comments
Comment #1
baronmunchowsen commentedI am having exactly the same issues as above. I have followed all instructions with no joy. I want to force non-authenticated users to 'user' and upon login I want users to be redirected to 'node/73' rather than seeing their account details page. I also want the homepage of the site to be 'node/73' for all authenticated users.
Seems simple enough, and the readme that come with the module/inline instructions on the settings page would have you believe that it is, but I can't for the life of me get this working.
Comment #2
jadowd commentedI am having the same problem... I want unauthenticated users to see a splash page with the login box. that part works, however, when they log in, even though I have authenticated users redirected to a valid and content rich node, they only see that whish I have posted for the splash screen.
Any help would be appreciated.
Kind Regards,
Comment #3
jadowd commentedHmmmm... Somewhere along the way, I must have missed that I had a page aliased as front_page... you guys should double check for that... I found that I had one, and when I deleted them (or renamed them if that is better for you) I found that the front_page module works well.
sorry about that!
thanks,
Comment #4
Cory Goodwin commentedI have experienced the same problem with this module. I do not have any page named /front_page.
What I thought the module does:
Anonymous User visits the page he sees a Welcome page with a user login/register box.
After logging in the user sees the regular /node for the latest posts.
However, currently if an anonymous user visits the site he sees the welcome screen. After logging in the user still sees the Welcome screen and in order to see the /node screen the user must click the Logo or Home link.
Any suggestions?
EDIT:
The module seems to work correctly if I create the Welcome page for anonymous users via the text input box and select themed. Then when the user logs in the user is redirected to /nodes.
Comment #5
SamRose commentedYour solution of not redirecting anon users, but rather creating page content for them also worked for me. Thanks!!!!!
Comment #6
izmeez commentedI'm really new at this.
It still seems to be more intuitive if the module after log in calls "Home" which is already working and redirects as per role.
This would also lend consistency. For example, when an anonymous user arrives at http://mysite.com they see a front page which has Primary links so they can read the Terms Of Use, Privacy, etc. and return to Home to see the default front page as they wish. This all works just fine.
Now when they log in, they still see the default front page, but the Home key and bread crumbs take them to the appropriate page for their role. So if the front page module could simply add a call to Home after log in this would be superb.
Is there a way to add some PHP into the body to do this? Excuse me, but I know absolutely nothing about PHP expect it looks cute and powerful.
Izzy
Comment #7
SamRose commentedIzzy, the advanced front page module will allow you to override the "Home" link per role, to point them to the "Home" you desire. Does this address what you are talking about?
Comment #8
izmeez commentedSamRose,
The advanced front page module does override the "Home" link per role and that does work. But, on login it does not take the user to the appropriate page. They have to click on the "Home" item to go there. I need it to happen automatically on login.
Thanks,
Izzy
Comment #9
SamRose commentedI am finding that afp works when I actually populate at least one page in the setting with content. If, for instance, I have them all redirecting to existing pages, I am getting errors consistently.
This leads me to believe the module was written to expect content inserted into at least one of the content spaces in advanced front page setting
Comment #10
izmeez commentedMost importantly I would like to express my appreciation to all the Drupal community for such a wonderful website development environment and all the shared effort.
I am an utter newbie to Drupal, php, servers, etc and first heard of Drupal six weeks ago. I now have a community of users all excited to roll out a web site, yesterday, well almost a week of yesterdays now. The beta site is up and running but a few problems remain that need resolution before going live.
The Front page module adds essential functionality and should probably be called the "Advanced front page module". It is very useful.
As suggested in earlier comments, if content is created for anonymous users in the Advanced front page settings block and Select type is set to Themed it works. Unfortunately, this introduces some limitations and it may still be more intuitive to redirect to a Page that has been created as done with other roles.
When creating the block content in Advanced front page settings the lack of a hook to an editor, if installed such as TinyMCE, is limiting.
However, since adding content to the block for anonymous users does cause the Front page module to behave as expected and immediately take users to the appropriate role page on login, is there some simple php that could be inserted in the block body for anonymous users to display a specific Page node?
Quite unrelated to this, I was also wondering how to redirect all users to a specific page on logout.
Thanks very much,
Izzy
Comment #11
Cory Goodwin commentedI tried to use PHP redirect for anonymous user but that didn't work. The only way the module can display an anonymous user home page and then switch to a authenticated role home page at login is with the anonymous user home page set to themed and written inside the front page module.
Comment #12
izmeez commentedMy results using php were also disappointing. I tried various one-liners, each of the following lines were tried without the semi-colon.
Only the first of these which essentially mimics the default front page behaviour allowing other pages and stories to be promoted to it behaved as "content" but those promoted pages are teasers, not full pages. Each of the other lines works to display the page but it does not satisfy the module as "content" and does not cause the user to be taken to the appropriate page based on role when they login.
Izzy
Comment #13
saltcod commentedI COULD NOT get this.
I've got 5 roles.
I need 1 role to go somewhere different and the rest to go back to the regular front.
I put
In the BODY of the anonomyous user field, redirected the role I wanted redirected and that's that.
Make sure you put that code into the body.
Comment #14
kenorb commentedI've the same problem.
Solution #13 doesn't work for me.
Comment #15
JohnnyMoney commentedI am working with Drupal 6.6 and regret to say that the module is not working the way I'd like.
All I want is that registered users be taken to a different home page when they enter and that after that they go to the normal home page whenever they hit any of the home links.
According to the readme file it is quite straighforward but I just don't get it.
Thanks for the module, it is really something useful, but right now it is not working properly.
Comment #16
dublin drupaller commentedCorrect.
Generally it's recommended you use the text area for anonymous users and use redirect for authenticated users.
The main reason is that if you are using redirect for anonymous users, you lose a lot of the functionality of the front page module. As an example, if you redirect anon users to
node/1234when they login, they will arrive back atnode/1234because the "login destination" isnode/1234. Where as if you use the text area for anon users provided by the front page module, when the anon user logs in from the front page, they will be presented with the authenticated users front page..hope that makes sense.
Comment #17
Alaska commentedGave front page (5.x-1.9) a try and it works as advertised. Anonymous users have no check marks and can only see the home (front) page. The URL can not be modified (www.mysite.com/node/22) and if it is, there is a no access message when trying to access node 22. Perfect!!!!
The text for the home page is entered into a front page body block. However, does anyone know if it is possible to use PHP and have that front page field take its text from node/3? This way, the site editor could modify a node 3 page in the usual Drupal way in place of using the new field required by front page. Tried a number of PHP snippets and none worked even though the field will accept PHP.
Also tried TAC Lite, but it is overkill for the application of only showing a front page to anonymous with authorized having full access to the site, cart, etc.
Comment #18
dublin drupaller commentedTry the following snippet..
don't forget to enable the PHP option on the front page when using PHP.
Dub
Comment #19
Alaska commentedDub:
Gave it a try and it works fine.
Thanks so very much for the code.
Comment #20
dublin drupaller commented