1

I changed the default author of a node to blank (' ') for the needs of my project. So, currently when I create a node, "Authored by" field is empty. Then, I could assign author and this works fine - the assigned author is displayed within the Authoring information.

But when I edit the article, the 'Authored by' field is again blank, so if I just want to change something in the body, I would need to assign author again.

Any suggestions how to make the field to remember its value?

5
  • sounds like a bug, Drupal 7 or 8?
    – No Sssweat
    Jul 9, 2016 at 10:58
  • Drupal 7, sorry for not mentioning it
    – barurumm
    Jul 9, 2016 at 11:03
  • 3
    Can you post the code where you set the node author to blank? I suspect you applied this to the form in general, not just for new nodes. Thus the content is set to blank whenever you open the form.
    – Zuzuesque
    Jul 9, 2016 at 16:50
  • Yes, that seems to be the problem. I switched to '#default_value' => '' " in the $form['author']['name'] array. Do you have idea how to make that for the new node, instead of the form itself?
    – barurumm
    Jul 11, 2016 at 8:08
  • Are you write custom code for this?
    – RajneeshB
    Jul 22, 2016 at 6:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.