Page 1 of 1
redirect_page
Posted: Sun Jun 28, 2015 3:57 pm
by nltsvc1
Hi new to the board and thanks for being there!
I've used CMS for years and love it, had no problems until now?
redirect_page will not work.
CMS 1.12
FrontEndUsers 1.29
CustomContent 1.10
I don't get any logs for the issue I'm having.
I put the following code in a template
{if !$ccuser->loggedin()}{redirect_page page='login'}{/if}
When I press Apply nothering happens, no errors nothing. If I press Submit the CMS editor goes away and the site comes up. Still no errors logged and the code in the template is gone. I changed 'login' to '' and it works but I get an error stating I tried to redirect to a bad page alias. If I put any page alias in in does nothing when I press Apply. I'm thinking somewhere there is something that states "Allow redirects" but I can't find it. Please help this is making me crazy!
Thanks in advance
Doug-
Re: redirect_page
Posted: Sun Jun 28, 2015 5:34 pm
by Jeff
Is this on the template that you are using on the 'login' page?
Maybe you are getting a loop.
When I press Apply nothering happens, no errors nothing. If I press Submit the CMS editor goes away and the site comes up. Still no errors logged and the code in the template is gone. I changed 'login' to '' and it works but I get an error stating I tried to redirect to a bad page alias. If I put any page alias in in does nothing when I press Apply. I'm thinking somewhere there is something that states "Allow redirects" but I can't find it. Please help this is making me crazy!
I am confuse on what the process to duplicate this error is.
Re: redirect_page
Posted: Sun Jun 28, 2015 5:58 pm
by nltsvc1
Yes I created a template that is an exact duplicate of a stock template,
CSSMenu left + 1 column. I renamed it to restricted and then added the code "{if !$ccuser->loggedin()}{redirect_page page='login_page'}{/if}"
right under the </__body> tag in the new "restricted" template. The login_page had in it's content {FrontEndUsers} but I thought the same, a loop so I took it out and just tried to redirect to any page I have. I then took out the $ccuser and just tried to redirect to any page via a template, no luck. When I try to redirect and press the "Apply" button nothing happens. If I press the "Submit" button the editor closes and the web site opens. When I return to the editor the redirect tag I put in is gone. I've used redirect before with no problems, very puzzled.
Re: redirect_page
Posted: Sun Jun 28, 2015 6:19 pm
by nltsvc1
I thought I replied but apparently I didn't. If I put this code in a template,
{redirect_page page='login'} and press "Apply" nothing happens. If I do the same but press "Submit" the editor closes and the site comes up. If I go back one page using my browser's back page function to get back to the editor the code {redirect_page page='login'} is gone. On the login page I removed the code {FrontEndUsers} and I still end up with the same results. I've used redirects before with no problem, something is wacky here and I can't figure it out. By the way it throws no errors anywhere. I've checked the Admin log and there is nothing there but the fact that I edited the page.
Doug-
Re: redirect_page
Posted: Sun Jun 28, 2015 6:46 pm
by nltsvc1
Well, if no one is talking about a problem it's probably because I did something stupid! I had a module for Front End Users Messages, took that out and now everything works as it should. Problem solved, stupidity reigns supreme! Thanks for looking!
Doug-