Still cannot enter comments on nodes with RealName
tborrome - January 11, 2009 - 05:54
| Project: | RealName |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
With realName enabled (override username them on and show realname in nodes on), comments still cannot be entered.
I also tried with the new forms bypass features using "comment_form name" and "comment_form author"
This is easy to reproduce:
1. Create a node
2. Enter a comment
Error will show: "You have to specify a valid author."

#1
I just did exactly that with no problem. Please try this again with the most recent -dev version. I can enter comments with no problem.
#2
Thanks. I tried with the -dev version and I'm now able to enter a comment with realname enabled.
I do see another related issue with realname and comments. When editing a comment - white screen of death comes out.
To reproduce:
1. Post a comment on a node
2. Edit the comment.
Plain white screen comes out in Firefox
IE displays "Internet Explorer cannot display the webpage"
Apache logs show:
[Mon Feb 02 22:50:51 2009] [notice] child pid 21922 exit signal Segmentation fault (11)
Disabling the RealName module fixes the problem, so something in the module seems to be causing this behavior.
#3
#4
Hmm, see #365609: Viewing user profile - "Not available" which I only fixed in 6.x, but maybe need to back-port.
#5
ok, I'll try the fix in 6.x. but are you able to reproduce the issue? want to know if its only on my side.
its quick to check - just try editing an existing comment on any node with realname enabled.
#6
Ok - so I tried the same solution of changing the $op parameter from 'load' to 'view' in realname_nodeapi and that fixed the problem in 5.1-dev release. could this change cause other side effects though? seems to work so far ...
here's the modified realname_nodeapi:
function realname_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
if (!user_access('use realname')) {
return;
}
if (!variable_get('realname_nodeapi', FALSE)) {
return;
}
switch ($op) {
case 'view':
// Node is being loaded.
// Save the username that is already there.
$node->realname_save = $node->name;
$account = user_load(array('uid' => $node->uid));
$node->realname = $node->name = realname_make_name($account);
$node->homepage = isset($account->homepage) ? $account->homepage : NULL;
break;
case 'prepare':
// Node is about to be edited.
// Reset the username or save will fail.
if (isset($node->realname_save)) {
$node->name = $node->realname_save;
}
break;
}
}
#7
Thanks for testing it. I have not, as yet, seen any fallout from this change.
#8
This will be there in the next commit, which is currently waiting for testing of the autocomplete issue.
#9
An official release was created a few days ago.
#10
Automatically closed -- issue fixed for 2 weeks with no activity.