-
Notifications
You must be signed in to change notification settings - Fork 20
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
Pjax causes POST error #24
Comments
Because every layer write message in flash
and after every ajax call notification-wrapper read this message from session once after POST request and display it in your layer (noty, toaster, etc..). If your dont send POST after ajax - you can see here |
I have been using this on all my pjax requests (and ajax), ie |
You have 500 error in noty/default/index (not found router?). Please, check your config as in Readme, clear cache, etc... |
Okay, I did find that removing the 'template' option from my widget setup fixed the 500 error. 'toast' => [
'fade' => 'slow',
'template' => '<div class="alert alert-%priority% alert-dismissible" role="alert">' .
'<button type="button" class="close" data-dismiss="alert">' .
'<span aria-hidden="true">×</span>' .
'<span class="sr-only">Close</span>' .
'</button>' .
'<span class="message"></span>' .
'</div>',
], Further, though, I don't understand why 2 requests to /noty/default/index are being sent per Pjax call. |
May be you have grid view or submit form via ajax? |
Yes, I do use gridview, still unsure why the template option would be affecting routing. I'm not sure what you're suggesting, sorry. |
For some reason, whenever I load Pjax (or make ajax requests) on any page, POST requests get sent to /noty/default/index as well.
https://imgur.com/j0RQP2c
Not the greatest with JS, so a little bit confused what's going on here, any insight would be appreciated.
edit: to clarify, everything seems to work fine, i'm just unsure why these requests are being sent
The text was updated successfully, but these errors were encountered: