gpt4 book ai didi

Drupal:drupal_set_message 不显示消息

转载 作者:行者123 更新时间:2023-12-04 13:02:59 25 4
gpt4 key购买 nike

当用户在我的网站上注册时,我似乎无法从 drupal_set_message 收到消息。
我正在使用 Drupal 6.14。

在 user.module 中添加打印:

function user_register_submit($form, &$form_state) {
...
if ($notify) {
...
}
else {
drupal_set_message(t('Your password and further instructions have been sent to your e-mail address.'));
print 'xxxxxx';
$form_state['redirect'] = '';
return;
}
}
...

}

它打印'xxxxx';

一个 var_dump$_SESSION变量给出状态消息, drupal_set_message不显示,所以看起来也不错。

我已经卸载了我所有的模块,只剩下核心,现在使用 Garland 作为主题。

此外,我安装了一个全新的 Drupal 安装,它给了我一个很好的状态消息。

然后我比较了全新安装的 .htaccess 和 Drupal 的。修改我的以使它们相等。

没有什么帮助。

有什么想法吗?

最佳答案

我们刚刚解决了。显然,用户 0 丢失了,有人删除了它或某个模块做了它。
将其插入数据库后,我们再次收到消息。

这是你必须做的:

INSERT INTO `users` (`uid`, `name`, `pass`, `mail`, `mode`, `sort`, `threshold`, `theme`, `signature`, `signature_format`, `created`, `access`, `login`, `status`, `timezone`, `language`, `picture`, `init`, `data`) VALUES
(0, '', '', '', 0, 0, 0, '', '', 0, 0, 0, 0, 0, NULL, '', '', '', NULL);

然后将 uid 设置为 0,因为 uid 是一个自动增量!

不过,仍然不知道这与 drupal_set_message 的关系如何。

关于Drupal:drupal_set_message 不显示消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1513289/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com