Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirects hiding flash messages #283

Closed
xiaohutai opened this issue May 15, 2019 · 2 comments
Closed

Redirects hiding flash messages #283

xiaohutai opened this issue May 15, 2019 · 2 comments

Comments

@xiaohutai
Copy link
Member

I have troubles showing (custom) flash messages (from the session.flashbag).

So in order to fix the flooding of the system log, there were some return responses introduced:

Removing the return from return $response->send(); in src/Submission/Handler/Redirect.php makes the messages appear, and everything seems to be working fine again:

However, this will start flooding the system log again (which is preferable to no messages shown at all).

Removing the Exception simply breaks the form. Only with an Exception or exit/die, does it do what I want. But relying on this as a control structure seems like a super bad idea.

See https://github.com/bolt/boltforms/blob/4.2/src/Submission/Processor/Redirect.php#L90-L95

But I also have a feeling that something else might break because of these fixes. So, I'm not sure how to go from here.

@bobdenotter
Copy link
Member

See also #257

xiaohutai added a commit to xiaohutai/boltforms that referenced this issue May 15, 2019
bobdenotter added a commit that referenced this issue May 15, 2019
Fix flash messages again -- See #283 [EXPERIMENTAL]
@xiaohutai
Copy link
Member Author

Fixed in 4.3.0-beta.1, but the caveats still apply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants