• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Frontend user (FEU) can not login
PostPosted: Tue Jan 08, 2013 7:02 am 
Offline
Forum Members
Forum Members

Joined: Sat Dec 08, 2012 4:26 pm
Posts: 11
Hi,

I am using FEU in combination with Eventmanager. By registering a user can suscribe to an event (in my case a course).
This all goes well. A user registers, gets an activation link, activates and is logged in. After that he or she can suscribe.
The user is automaticaly logged out after 1800 seconds.

Now gets the tricky part. If a user returns to the page and would like to login with his user data, that doesn't work. After loging in with the right credentials, the only thing that happens is that the user is being redirected to the previous page.

I really don't know whats happening and could use all the help there is.

If you would like to try, login to http://baukejonkmans.nl/events/7/94/Bas ... dagen.html with un: bauke.jonkmans@gmail.com and pw: testuser

Thank you for your help!


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Thu Jan 31, 2013 12:28 am 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 12384
Location: Arizona
Looks like you fixed it, FEU has a couple ways of redirecting after login, one is set in FEU admin, the other is set in the tag, both are mentioned in the Help...

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get its parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Thu Jan 31, 2013 7:49 am 
Offline
Forum Members
Forum Members

Joined: Sat Dec 08, 2012 4:26 pm
Posts: 11
Hi Dr. CSS,

Thanks for taking a look. Unfortunately it is not fixed. What actually happens when you login (at this moment) is that the page redirects to the parent page (/kalender). What should happen is that the user stays on this page, but is able to register.

I used this tag {FrontEndUsers form="login"} and have not set a redirect in the FEU admin.

Do you have any idea what could be wrong?


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Fri Feb 01, 2013 6:46 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 12384
Location: Arizona
I don't quite follow what you want and what is not working, a little more detail with step by step walk thru of what should happen...

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get its parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Fri Feb 01, 2013 10:16 pm 
Offline
Power Poster
Power Poster

Joined: Sat Jan 22, 2005 11:19 am
Posts: 451
The detail page URL is a constructed route. After login, the user is redirected back to /kalendar as that is the real page.

Try capturing the URL route and then put that in the FEU tag as the redirect to location.


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Mon Feb 04, 2013 11:53 am 
Offline
Power Poster
Power Poster

Joined: Sat Jan 22, 2005 11:19 am
Posts: 451
If my previous comment doesn't work, try the following. I've used it in a few instances and it seems to work OK.

In your detail template, capture the constructed URL, eg if you have CGExtensions and CGSimpleSmarty installed:

Code:
{session_put var=detailurl value=$cgsimple->self_url()}


In your summary ('/kalendar') template put:

Code:
{if $ccuser->loggedin() and !empty($smarty.session.detailurl)}
{assign var='redirecturl' value=$smarty.session.detailurl}
{session_erase var='detailurl'}
{redirect url=$redirecturl}
{/if}



What it does is:

1. On the detail page, when the user logs in, it saves the constructed URL to a session var.
2. Once the user is logged in, by default it returns to the /kalendar summary page template.
3. That template checks to see if the session var 'detailurl' exists and if so, assigns it to a local var, erases the session var then automatically redirects back to the detail page with the correct URL.

hth
psy


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Mon Feb 04, 2013 12:19 pm 
Offline
Forum Members
Forum Members

Joined: Sat Dec 08, 2012 4:26 pm
Posts: 11
Hi Psy,

Thank you for your suggestions.

Just one question. Can you tell me what the best way is tot capture the URL route?

Aside from that, is that; won't the URL route be different for every event?

As for the alternative you mentioned (changing the template). Where to place the first code you gave?


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Mon Feb 04, 2013 9:12 pm 
Offline
Power Poster
Power Poster

Joined: Sat Jan 22, 2005 11:19 am
Posts: 451
Code:
{session_put var='detailurl' value=$cgsimple->self_url()}
goes in your detail template.

It will capture the route URL and put in into a session var called 'detailurl'. You can then test for $detailurl in the summary template.


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Mon Feb 04, 2013 9:23 pm 
Offline
Power Poster
Power Poster

Joined: Sat Jan 22, 2005 11:19 am
Posts: 451
Yes, the route URL will be different for every event which is what is captured by $cgsimple->self_url(). It gets the route URL as displayed in the browser for each event detail page.

Once saved, the 2nd part of the code will take the user back to the same event detail page they were on when they logged-in.


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Tue Feb 05, 2013 7:31 am 
Offline
Forum Members
Forum Members

Joined: Sat Dec 08, 2012 4:26 pm
Posts: 11
Hi Psy,

Thank you. I succesfully put
Code:
{$session_put var='detailurl' value=$cgsimple->self_url()}

in my event detail template. (Couldn't make it work without the $ preceeder.

Now i tried to add
Code:
{if
$ccuser->loggedin() and !empty($smarty.session.detailurl)}
{assign var='redirecturl' value=$smarty.session.detailurl}
{session_erase var='detailurl'}
{redirect url=$redirecturl}
{/if}

In the summary template (/kalender). Unfortunately this calls for the following error when calling for /kalender:

Quote:
string(142) "Smarty error: [in module_db_tpl:EventsManager;summary_Custom line 5]: [plugin] unknown tag - 'session_erase' (core.load_plugins.php, line 198)" string(154) "Smarty error: [in module_db_tpl:EventsManager;summary_Custom line 5]: syntax error: unrecognized tag 'session_erase' (Smarty_Compiler.class.php, line 590)" string(137) "Smarty error: [in module_db_tpl:EventsManager;summary_Custom line 6]: [plugin] unknown tag - 'redirect' (core.load_plugins.php, line 198)" string(149) "Smarty error: [in module_db_tpl:EventsManager;summary_Custom line 6]: syntax error: unrecognized tag 'redirect' (Smarty_Compiler.class.php, line 590)"


Do you have any suggestions on how to handle this?


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Tue Feb 05, 2013 7:39 am 
Offline
Power Poster
Power Poster

Joined: Sat Jan 22, 2005 11:19 am
Posts: 451
As mentioned in my original post with this method, you need CGExtensions and CGSimpleSmarty installed.

{$cgsimple->self_url()} , {session_erase} and {session_put} are CGSimpleSmarty tags.


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Wed Feb 06, 2013 6:54 am 
Offline
Forum Members
Forum Members

Joined: Sat Dec 08, 2012 4:26 pm
Posts: 11
Hi Psy,

Thank you for your answer and patience. I diden't read your post well enough.
I succesfully installed the CGSimpleSmarty module, added the code to the summary page /kalender and deleted the $ preceeder in your code for the detail event page.

When calling for /kalender, it generates the following faillure (with debugging on)

Quote:
string(137) "Smarty error: [in module_db_tpl:EventsManager;summary_Custom line 5]: [plugin] unknown tag - 'redirect' (core.load_plugins.php, line 198)" string(149) "Smarty error: [in module_db_tpl:EventsManager;summary_Custom line 5]: syntax error: unrecognized tag 'redirect' (Smarty_Compiler.class.php, line 590)" Notice: Undefined index: ccuser in /home/vhosting/j/vhost0039238/domains/baukejonkmans.nl/htdocs/www/tmp/templates_c/EventsManager^%%30^30E^30E6A6B8%%module_db_tpl%3AEventsManager%3Bsummary_Custom.php on line 5 Fatal error: Call to a member function loggedin() on a non-object in /home/vhosting/j/vhost0039238/domains/baukejonkmans.nl/htdocs/www/tmp/templates_c/EventsManager^%%30^30E^30E6A6B8%%module_db_tpl%3AEventsManager%3Bsummary_Custom.php on line 5


I tried your code also with "redirect_url" instead of "redirect url" but that doesn't seem to work either.

Do you have any suggestions?

Again, your help is very much appreciated. Thanks for that!


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Wed Feb 06, 2013 7:29 am 
Offline
Power Poster
Power Poster

Joined: Sat Jan 22, 2005 11:19 am
Posts: 451
Oops, I should have checked Extensions->Tags to get the correct syntax which is:

{redirect_url to=$redirecturl}

Note: The $ sign is necessary to let Smarty know it's a var within a tag.


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Wed Feb 06, 2013 11:01 am 
Offline
Forum Members
Forum Members

Joined: Sat Dec 08, 2012 4:26 pm
Posts: 11
Hi Psy,

Thanks. I made the changes and there seems to happen something, thats possitive ;-) The other side is that there seems to be another faillure:

Quote:
Notice: Undefined index: ccuser in /home/vhosting/j/vhost0039238/domains/baukejonkmans.nl/htdocs/www/tmp/templates_c/EventsManager^%%30^30E^30E6A6B8%%module_db_tpl%3AEventsManager%3Bsummary_Custom.php on line 5 Fatal error: Call to a member function loggedin() on a non-object in /home/vhosting/j/vhost0039238/domains/baukejonkmans.nl/htdocs/www/tmp/templates_c/EventsManager^%%30^30E^30E6A6B8%%module_db_tpl%3AEventsManager%3Bsummary_Custom.php on line 5


Does this sound familiar to you and do you know how I can fix it?


Top
 Profile  
 
 Post subject: Re: Frontend user (FEU) can not login
PostPosted: Wed Feb 06, 2013 11:18 am 
Offline
Power Poster
Power Poster

Joined: Sat Jan 22, 2005 11:19 am
Posts: 451
Doh! FrontEndUsers and CustomContent are so closely intertwined I forgot that they are separate modules. It's almost second nature to install both.

$ccuser is a CustomContent module object. Install the CustomContent module and read the help text.

Also check the FEU help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: googlebot


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting