Also this is not the only way of using or should I say programming this plugin but just one of the ways. I think that once you have seen it working once and the way that it does what it does then you should definitely be able to get what you need with this.
On both occasion, user is redirected to http://www.google.com and what’s more interesting is their logout text is displayed correctly! So, for “Super Admin” they see “yahoo.com” for logout and for member_group == “8” or else they see google.com.
I’ve just installed this extension and plugin and all works wonderful with one exception. Upon enabling the extension, I get the following error:
Notice: Undefined variable: default_settings in /Volumes/A/WebSites/jcicms.com/jciads/backend/extensions/ext.logout_redirect.php on line 51
Notice: Undefined variable: sql in /Volumes/A/WebSites/jcicms.com/jciads/backend/extensions/ext.logout_redirect.php on line 66
Warning: Invalid argument supplied for foreach() in /Volumes/A/WebSites/jcicms.com/jciads/backend/extensions/ext.logout_redirect.php on line 66
Warning: Cannot modify header information - headers already sent by (output started at /Volumes/A/WebSites/jcicms.com/jciads/backend/extensions/ext.logout_redirect.php:51) in /Volumes/A/WebSites/jcicms.com/jciads/backend/core/core.functions.php on line 296
The extension still works as it should without problems, and shows as being enabled, I just get the error on initial enabling. Should we be concerned? I’m running EE 1.6.3 with no mods or hacks as I’m starting a new project.
Also, one more question… can this be used in conjunction with your FetchURI extension?
I’m getting the same message that JCI is getting above when enabling the extension.
Also, I can’t get it to work either. I’ve copied/pasted your exact example code in the first post in this thread and here is the URL it keeps wanting to redirect me too:
http://www.kentuckygolfing.com/?ACT=10
This happens even though the URL I’m specifying to redirect too is “http://www.yahoo.com” as your example demonstrates.
Not good. Just tried it myself on the new version 1.6.3 of ExpressionEngine and indeed it does seem that there is something going on here. I had originally written this for 1.6.1 I think and so there must be something different somewhere due to the upgrades. I will have a look at this if I get any time soon. Pretty busy at the moment though and as I’m not really a coder I’m not entirely certain I will know what is up. Will take a look though but I may have to get some developer support on this one as I’m not really too sure why it would suddenly stop working like that.
Sorry about this. Will take a look as soon as I can.
It is still redirecting me to Yahoo’s homepage even though yahoo.com isn’t anywhere to be found in the template code.
Also, I’m not sure if this is by design or not, but when I hover of the link it is still showing “http://www.kentuckygolfing.com/?Act=10” as the URL in the status bar.
Sorry about this. Not too sure what is wrong there then. What version of ExpressionEngine are you running this on?
Also you may need to go and delete the table that the extension has installed to your database because if it isn’t getting removed correctly (although now it should be - perhaps try removing and re-installing the extension a couple of times) then if you had yahoo as the place to re-direct to but that isn’t getting written over in the database then this would cause that kind of behaviour.
So the first thing to try would be disable the extension and re-enable it a couple of times and then try again. If that doesn’t do it then you may need to disable it and then delete the exp_logout_redirect table that was created and then try re-enabling the extension again.
I just tried this on another 2 fresh installs of 1.6.3 and they both worked fine each time so I think there must be something stuck in the piping somewhere.
I was actually thinking of re-making this so that it doesn’t use any database tables actually as the whole thing could be sorted by setting a cookie value and then using that instead. I may look at doing that if I get the time some day soon.
Version 1.6.3 Mark. Still a no go. I’ve deleted the table in the database and deleted all instances of the ext/plugin from my system folder and re-enabled everything and tried it again and again it takes me to yahoo.com.
So… I guess I’ll let the default logout be for now. I’m not exactly sure that the extension will do what I need anyway so maybe once I get everything else finished on this site I can revisit this problem and see what happens.
EDIT - New version of extension is attached to the first post in this forum thread
Oops!!!! Please tell me I’m not really THAT stupid am I?!!!
New extension added to the end of this post and I will delete the one above. I had hard-coded Yahoo into the extension whilst I was testing and had forgotten to take it out again afterwards!!!
Mark, please make sure you update the plugin link at the top of the thread. It’s become an unwritten law (or best practice) to have the most recent version of a plugin be at the top of the thread so people don’t have to go looking for the right one.
I was going to do that but I think that I might add in two versions instead. The reason being that I am not too sure why it suddenly stopped working and as I mentioned before I originally wrote this for a much earlier version of ExpressionEngine and was just following one of the examples from the documentation and so I guess that things have changed a bit since the time when I first made it so was offering up this new version in the hope that it would work although at the moment it seems as though it isn’t working correctly for some reason although I’m not having a problem this end on new installs so I would rather make sure that it is definitely working perfectly before getting rid of the one in the first post if that’s okay?
I do know about the unwritten law actually and always try to do that with my other plugins and add-ons where ever possible so will definitely do that with this one once I have pin-pointed just exactly what is going on with this, or I re-write it to use a cookie instead.
I don’t suppose you would like to test out the latest version of this - two posts above would you Sue and let me know if you have any joy with it?
I’m just wondering if it is something on my system that is allowing me to get this working correctly? One other thing Deron - what version of PHP are you running on your site?
Yep sorry about that. Leaving in test code when you post it as a new version is probably not a good thing to do now is it!!
I will delete the one from above and point to the first post where I will update that version. I have also changed the description slightly when you go to your Extensions manager as I did originally have this working from a setting in the Extensions Manager but that meant that you could only ever log out to the one page and this way is much better. You can leave yours as it is though if you’re not bothered by it or just download the extension from the first post (once I have done that!) and upload it over the top of the existing one.
Just out of interest how are you using this on your site then Deron. Always nice to know how people are using these things!
Also when I get the chance I think I am going to move this one over to using a cookie instead of using the database. Admittedly it may not work in all cases if people obviously have cookies turned off but I think it might be better in the long run.
Mark, please make sure you update the plugin link at the top of the thread. It’s become an unwritten law (or best practice) to have the most recent version of a plugin be at the top of the thread so people don’t have to go looking for the right one.