I am reviving the issue raised here - node/303550 .

This happens only when a user with administer nodes rights tried to create new content.
The Authored By form element is automatically filled by the user's "realname".
Afterward, when node is vaildated, the node.module code checks if there is such a user, searching by field 'name'.
Of course, no such user exists, and form can not be validated.

For some reason, the code in realname nodeapi (op=prepare) does not do the trick, as "node->realname_save" is not set.

      if (isset($node->realname_save)) {
        $node->name = $node->realname_save;
      }

adding the following patch does work:

      if (isset($node->realname_save)) {
        $node->name = $node->realname_save;
      }
      elseif (arg(0) == 'node' && arg(1) == 'add' ) {
          global $user;
        $node->name = $user->realname_save;
      }

Can someone please help?

Comments

joelstein’s picture

Version: 5.x-1.1 » 6.x-1.3

I had a very similar problem, though it was in combination with the Form Block module. For some reason, the realname_save variable was empty when Form Block was building the node form. It only occurred for administrators. Perhaps it was a permission problem? Perhaps it was some integration problem with Form Block. I don't know. We eventually just used our own custom hook_form_alter() to add the username into the node form, so the node would validate.

hass’s picture

Issue summary: View changes
Status: Active » Closed (outdated)