ResponseRedirect in xenOverlay AutoValidator - No redirect?

Alteran Ancient

Well-known member
Right, I'm not quite sure how I'm going to describe this one...

I've been building an in-house ban management system for my community's game servers. They're Source Engine Dedicated Servers, if you're interested in that kind of detail. I've got the fundamentals working - add a ban and "un-ban" a ban - they are enforced on the game servers correctly. I have now decided that senior admins may want to delete ban records in some extenuating circumstances.

So, on the /bans/ URL, we have the main bans list. It's just a rather simple table that lists active, cancelled and expired bans, and has a slide-out form to add to the list (fully works with AJAX).

If I view an active ban, I may "un-ban" it and the page will be updated as desired to reflect this. Individual ban items use the URL format /bans/playername.123/ - When I want to delete the ban, however, it is quite reasonable that I might want to go back to the main bans list. There is where I've run into an issue.

So I have a xenOverlay with a simpl Yes/No verification question. Upon "Yes", the overlay should disappear, and the user be brought back to the /bans/ page. What's happening, is I am getting the confirmation slide-out, and then just sitting on the same page without being sent anywhere. The item in question IS being removed from the database, but the expected re-direct just isn't happening.

Here's my snippet of code:
//Create a new DataWriter, select the Ban, and Trash it...
        $writer = XenForo_DataWriter::create('SGCBans_DataWriter_Ban');
        //Re-direct to the main Bans list...
        return $this->responseRedirect(
            "Ban Deleted Successfully."

As far as I know, that code should be alright. So what could be causing the success message to appear, but the redirect to not take place?

If you need anything else that might be of help and I've not provided it, please met me know.


Alteran Ancient

Well-known member
That behaviour is rather inconvenient. Could you recommend a work-around (say, with Javascript or otherwise) that would allow me to force the user to another page?