1

在我的 drupal 站点中,当用户在右侧块的时事通讯中输入电子邮件地址时。因此没有显示成功消息,我检查了该 simplenews_subscriptions_page_form_submit()功能,它实际上正在设置消息,例如

 if (simplenews_confirmation_send_combined()) {
        drupal_set_message(t('You will receive a confirmation e-mail shortly containing further instructions on how to complete your subscription.'));

      }

在我调试了 drupal_get_messages() 函数后,查看任何值是否为它返回的任何值,是的,它是

Array ( [status] => Array ( [0] => You will receive a confirmation e-mail shortly containing further instructions on how to complete your subscription. )

但是在字体主题中没有显示任何内容,我还检查了 theme_status_messages() 函数,它实际上最初检查了它, $display = $variables['display'];然后当我调试这个值时,它总是打印为空,但$variables['display']值已设置。

任何人都可以让我知道如何解决这个问题吗?

仅供参考:我正在使用 Drupal v7

4

1 回答 1

2

您确定在被调用的主题中提到了 $messages 变量吗?如果没有,请在 page.tpl.php 中提及

于 2013-02-08T22:14:37.087 回答