Closed (works as designed)
Project:
Nice messages
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2012 at 15:04 UTC
Updated:
29 Jul 2021 at 13:02 UTC
Jump to comment: Most recent
Comments
Comment #1
dqdThis is not a critical issue. Descriptions of the Priority and Status values can be found in the Issue queue handbook.
Comment #2
dqdNice messages is build to react when the Drupal system throughs system messages while the site loads. Not sure if this is the reason but if your AJAX form works without reload (as it should) at submit, it is possible that this AJAX form bypasses the typical way provocating system messages, and Nicemessages can't react on this. Not sure. Reading thru' this https://drupal.org/node/752056 made me thinking that. But maybe some users can bring more light into this issue (if it is still one) ...
Comment #3
dqdComment #4
dqdcan someone chime in and help with reports? I can't reproduce it ...
Comment #5
yusufsarac commentedIn drupal commerce buying steps for example. When you click on continue shopping without entering the required values, it loads the page with ajax and there is no nice messasges popup. It shows default drupal error messages.
Comment #6
dqdthanks Merco. Can you give more info? What makes the page load via ajax? Is it a custom form or an ajax module or views?
Comment #7
mfrosch commentedHi diqidoq,
I've got the same behaviour - normal core msg instead of nice messages on webform ajax submittes.
There is a module called webform ajax. With this module you can enable ajax on webforms.
I'm using webforms as block with ajax - there I get this problem.
Hope this helps. If you got further questions, let me know.
Cheers,
Matthias
Comment #8
sd42 commentedOk, what solved the issue for me is to implement hook_node_form_alter in order to add an own validation handler to my form. Within the validation handler "nicemessages_set_messages();" needs to be called, that's it! :-)
Comment #9
zero4281 commentedIf you're not getting a Nicemessage during ajax then add 'nicemessages_set_messages();' right before the return of your ajax_callback function. Remember that if your doing drupal_get_message() it clears out all of the messages so Nicemessage has nothing to display. I'm using a custom implementation of commerce and went so far as to remove the div where the status message would be displayed and everything works now. I didn't have to add it as a validation function because validation doesn't occur during ajax. You have to have it in a callback function.
Since there aren't any hooks for ajax_callbacks this isn't really a bug. This bug should be closed.
Comment #10
zero4281 commented