Any idea why this works:
{if segment_1 != ""}
{exp:logout_redirect url="http://www.mydomain.com/addons/ee/{segment_1}" text="logout" styles=""}
{if:elseif segment_2 != ""}
{exp:logout_redirect url="http://www.mydomain.com/addons/ee/{segment_1}/{segment_2}" text="logout" styles=""}
{if:elseif segment_3 != ""}
{exp:logout_redirect url="http://www.mydomain.com/addons/ee/{segment_1}/{segment_2}/{segment_3}" text="logout" styles=""}
{/if}
But this doesn’t?
{if segment_2 != ''}
{exp:logout_redirect url="{path={segment_1}/{segment_2}}" text="" styles=""}
{if:elseif segment_1 != ''}
{exp:logout_redirect url="{path={segment_1}}" text="" styles=""}
{/if}
or, better yet, this?
{exp:logout_redirect url="{path={segment_1}{if segment_2}/{segment_2}{/if}}" text="" styles=""}
strange error when loading a page with logout redirect (only happens in IE):
MySQL ERROR:
Error Number: 1062
Description: Duplicate entry '1' for key 1
Query: INSERT INTO exp_logout_redirect_url SET member_id = '1', redirect_url = 'http://mysite.com/addons/ee/blog/categories/category/'
any clue what’s happening?
more detail on bug reported previously:
below is the error that is generated
MySQL ERROR:
Error Number: 1062
Description: Duplicate entry '1' for key 1
Query: INSERT INTO exp_logout_redirect_url SET member_id = '1', redirect_url = 'http://mydomain.com/mypath/'
anyone else seeing this? hello?
Can’t see what I’m doing wrong. I want to redirect back to the page that the person logged out of and {segment_X} doesn’t work. Here is the code, basically straight from the Forum Module Top Bar plus logout-redirect. I do have the Forum running through EE template, so tags are working and the logout-redirect works, but not with the segment. Platform is always segment_1. Here is the URL it returns: http://domain.com/platform/{segment_2}
{if logged_in}
<table border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td><span>{lang:logged_in_as}<b>{screen_name}</b></span></td>
<td>{exp:logout_redirect url="http://domain.com/platform/{segment_2}" text="LOG OUT" styles="class='logout-link-class' title='Logout Link'"}</td>
Hi Mark thanks for the great plugin.
Is it possible to have two tag pairs of your extension in the same template with both log outs redirecting to two different places? I have tried it but it seems that the first one loading is over-writing the url of the second logout.
thanks heaps
Hiya,
Unfortunately I’m not really actively supporting this add-on any more as there are other add-ons which work a bit better than this one. Admitted I’ve not seen one that can log you out and redirect to multiple places although from what I’m thinking on this one I don’t think that will be possible as what happens is the plugin writes a URL (the URL you want to redirect to) to a database table for each user. This is then used upon logging out. What is happening in this instance is that the first URL gets set in the database table but then as soon as the next plugin call is placed on the page that is overwritten.
As there can only ever be one value in the database at one time then this isn’t going to be able to work in its current incarnation. The only way I could see this working would be to have some sort of session variable set with each plugin call and then upon clicking the link that link would have to have something extra in it to tell the system which link was clicked and thus which session variable to use to log out to.
Unfortunately as I said I’m not really actively pursuing this add-on any more due to time constraints and needing to get paid client work out of the way first but if I do come up with any mind-blowing ideas on this I will definitely think about re-visiting it at some point.
Sorry not to be able to help on this right away but at its current state you are quite right that the second plugin call is overwriting the first plugin call and so this behavior will always take place at the moment. I promise I will have a think about this though.
Best wishes,
Mark
Mark,
Thank you for this handy plugin.
Interfacer,
Just to let you know, I was able to achieve the same results as having 2 tag pairs on one template (at least for my needs) by using conditionals and an embed. Like so:
Master Template:
{if logged_in}
{if member_group == "17"}
{embed="ai_profiles/associate_logout"}
{/if}
{if member_group != "17"}
{exp:user:stats}
{exp:logout_redirect url="{public_profile_url}" text="Logout" styles="title='Logout' class='logout_link'"}
{/exp:user:stats}
{/if}
{/if}
Embedded Template:
{exp:logout_redirect url="http://www.obxguides.com/ai_profiles/login/17/" text="Logout" styles="title='Logout' class='logout_link'"}
Hope that helps…
I’m having extra trailing /’s when I try to use {segment_X} tags, like others on here. Mark, you mentioned that there are other add-ons which work a bit better than this one. Can you point me to one of those, as you’re not really actively supporting this add-on anymore? I would just like to send my users back to the page they came from when logging out, without any trailing /’s.
Thanks!
Hi James,
If memory serves me right then the Twomile Redirect After Login extension would be your best bet here I think.
Best wishes,
Mark
Hi Mark,
Could you make it work for EE2? That would be very nice! Look at this post
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.