Skip to main content
9 events
when toggle format what by license comment
Jun 17, 2013 at 9:31 history edited Madis CC BY-SA 3.0
Improved answer based on comments
Jun 17, 2013 at 9:08 vote accept gregab
Jun 17, 2013 at 9:08 comment added gregab yes, i just tried that. $vars['messages'] = $vars['show_messages'] ? theme('status_messages') : ''; did the trick.
Jun 17, 2013 at 9:06 comment added Madis Not sure what's going on then, but try throwing $variables['messages'] = theme_status_messages(array('display' => NULL)); inside the preprocess_page function and check if that makes them appear at the right time.
Jun 17, 2013 at 8:55 comment added gregab Yes, i flushed caches, i even logged out and back in. Just in case something is in session. Yes, it is weird, because now form is being processed before page.tpl and messages should get filled. The messages appear at the next page request.
Jun 17, 2013 at 8:49 comment added Madis Weird, I had basically the same issue in the past and doing things this way solved it. Did you flush the caches and made sure the preprocess_page function is being invoked? Is the problem the exact same as before (messages appear at the next page request)?
Jun 17, 2013 at 8:36 comment added gregab I have tried with debug, print $messages really does get invoked later then validation function but variable $messages is empty at that time.
Jun 17, 2013 at 8:29 comment added gregab This still does not resolve the issue. I have moved my drupal_build_form in preprocess_page function.
Jun 17, 2013 at 8:02 history answered Madis CC BY-SA 3.0