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

Returning message(s) stored for next request #36

Open
pridit opened this issue Jan 29, 2018 · 2 comments
Open

Returning message(s) stored for next request #36

pridit opened this issue Jan 29, 2018 · 2 comments

Comments

@pridit
Copy link

pridit commented Jan 29, 2018

We have getMessages() which is returning from the previous request, and everything is a derivative of this. I want messages to be sent to the next request, but also retrieve them within the current logic I am doing prior to that for validation or otherwise.

I would need to be accessing $this->storage[$this->storageKey] to get anything currently stored for the next request.

Please let me know whether it's viable to add a new method to support this, or I am just being stupid and missing something overt that achieves what I'm aiming for.

@lezhnev74
Copy link

Just stumbled upon this issue.
I am writing this pseudo code:

- validate many input fields
- if field is wrong - call `addMessage()`
- I thought I could know if there were problems with just polling flashMessages APIs... But there is no such method.

getMessages() returns data from previous/current request, but not ones queued for the next one.

@ve3
Copy link

ve3 commented Oct 7, 2019

I think I have the same problem.
My process.

  • Page one call addMessage() for 2 messages (2 keys).
  • Page two call getMessage('key1'). The message display correctly but there is one more key left uncalled.
  • Page two make ajax request to get common pages data.
  • The common pages data controller call getMessage('key2') which is never call before. This should displaying message for key2 but there is nothing left after call to key1.

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

3 participants