1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug _xfNoRedirect is always set to true when using formOverlay

Discussion in 'Resolved Bug Reports' started by Lior., Jul 3, 2013.

  1. Lior.

    Lior. Well-Known Member

    Not sure if this is truly a bug, but from what I can see, whenever a form has the formOverlay class, _xfNoRedirect is always set to true, whether the form is sent via an overlay or not.

    Also, when reporting content not through an overlay, but through posts/X/report, it doesn't do a redirect back to the post, which I believe it's supposed to do.
  2. Mike

    Mike XenForo Developer Staff Member

    Form overlays aren't related - any form submitted via AJAX, using XF's AJAX wrapper, will have that parameter.
  3. Lior.

    Lior. Well-Known Member

    I understand. Shouldn't there be a way to distinguish between requests sent regularly and requests sent via an overlay though?

    I mean, when a form is sent not using an overlay, you'd probably want to redirect the user to some other page. This is currently impossible.
    xf_phantom likes this.
  4. xf_phantom

    xf_phantom Well-Known Member

    I agree.
    Even if the controller sends a redirect response, the user won't be redirected because the xenforo javascript stops this

    Eg. after the post report the controller returns even a redirecturl
    $controllerResponse $this->getPostSpecificRedirect($post$thread);
    $controllerResponse->redirectMessage = new XenForo_Phrase('thank_you_for_reporting_this_message');
    but nothing happens for users with activated javascript, which opened the form in a new browserwindow, except the short notice, which could cause people to resend the form again and again if they didn't see the short notice (i know that i've done this several times, because i'm opening the report window always in a new browserwinder)

    Couldn't you change the javascript code, to verify if it's REALLY a overlayform and prevent only then the redirect? (just an idea^^)
  5. Lior.

    Lior. Well-Known Member

    @Mike Any chance this could be addressed?

Share This Page