开发者

Drupal variable messages empty on frontpage

I've a drupal site with some plugins, everything is running fine, but i don't know why, in my frontpage th开发者_Python百科is code isn't working:

if($is_front){  
   if ($messages):  
      print $messages;  
   endif;  
}  

If i try to do a var_dump of messages, it results in empty string.

The same code, on other pages (not front) is working.

This variable is used when showing sys/drupal messages (ex: after user registration), if i set the user registration to show a page different than the frontpage, the message is showed, otherwise it's not.

Thanks


You obviously know that $messages is only populated when you submit a form and validation fails or something similar. I wonder if perhaps, that variable is being cleared upon redirection to the homepage and thus not showing up???

I assume you have a form or something on the homepage which you are submitting?

Cheers, Alex

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜