H
H
hiwibu2016-05-22 12:19:31
symfony
hiwibu, 2016-05-22 12:19:31

Why don't flash drives work after redirect in symfony 2?

like this doesn't work:

$this->addFlash(
                        'notice',
                        'Файл успешно заружен. Количество добавленных организаций: ' . 1
                    );
                    return $this->redirect($this->generateUrl($request->get('_route'), $request->query->all()));

and this is how it works
$this->addFlash(
                        'notice',
                        'Файл успешно заружен. Количество добавленных организаций: ' . 1
                    );
                    exit;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2016-05-22
@prototype_denis

Doesn't the browser give you a circular redirect error?
If you only have these two lines in your controller, then you do the following:

function foo() {
    return foo();
}

If this is not the case, then you will be redirected 2 times.
In app/config/config_dev.yml add redirect debug.
web_profiler:
    intercept_redirects: true

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question