Closed (works as designed)
Project:
Drupal core
Version:
7.23
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Mar 2006 at 20:11 UTC
Updated:
17 Aug 2013 at 16:35 UTC
Jump to comment: Most recent
Comments
Comment #1
chx commentedunable to reproduce (yes I am on php5 damned be that version)
Comment #2
lmanavi commentedHi, I'm having this same problem. I can't find a solution. I'm not sure if this thread is still active...but I have no idea why it's showing up 1 page late. I've tried debugging, and nothing. It's beyond me why this is happening and I need to find a fix for it as well. If someone has a solution, can you please post it?
Comment #3
jerryplin commentedI encounter this problem on 7.18 as well. What information would be helpful to debug?
I edit node.tpl.php to call drupal_set_message, and I then refresh a page. The message does not show up. When I refresh again, the message shows up. I then edit node.tpl.php to not call drupal_set_message. I then refresh the page, and the message still shows up. I then refresh, and the message then does not show up.
Comment #4
jerryplin commentedJust upgraded to 7.20 and confirmed that this issue still occurs. I imagine that there is something special about my particular setup, since it would seem to be pretty high priority if this affected everyone. The problem is that my installation is pretty standard, and I don't even know where to start debugging.
I'm setting this to active in hopes that someone will take a look.
Comment #5
seanrI haven't seen this since I originally reported the issue except in once specific occurrence: if you dsm in the theme layer, that will end up in the next page load due to the timing of when it gets called. If that's not the case here, then I suspect a module or theme is intercepting it somehow.
Comment #6
chx commentedComment #7
mattjbondi commentedOpening this again as I have experienced this twice now. My current set up is like this:
1. node.tpl.php prints the output from a custom module which is just called by theme('my_module')
2. The function call back in the custom module renders a form - drupal_render(drupal_get_form('the_form'))
I have print($messages) as is in page.tpl.php but if I submit the form with errors the fields highlight as they should on refresh - but no messages. These come a screen later, re-loading the page any which way basically. It is as though form_set_error is sending through what it needs to to highlight field errors but the message... well it doesn't make sense why there is a delay on the message and not the field highlights.
Thoughts anyone? Is it the steps I am taking to render the form? Cheers.
EDIT: Just to let you know I tried this method with no luck either: I called the theme('my_module') in preprocess_node in template.php and then spat out the result in node.tpl.php thinking if I called it earlier it may make a difference but nope.
Comment #8
chx commentedIf you call dsm from a template it can't print the messages as those are already printed into the page.
Comment #9
keyframer commentedJust use
krumo()directly instead. It will output immediately and break your layout, but for a quick trace this is way better than queuing up a drupal message.Comment #10
youngpac commentedi was facing the same kind of problem. the best solution that worked for me is to place the message in the drupal theme_preprocess_page. Here the message is loaded even before the page is loaded and hence there is no chance of the message being delayed to a later page or upon refresh.