No Authoring information passed
surge_martin - July 19, 2007 - 17:22
| Project: | Addnode |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I just installed and used Addnode for the first time, and it worked, but the child node was put through with an Anonymous author, not the user I was logged in with. It probably should pass through the info from the main form.

#1
Can anyone suggest how this can be rectified?
Thanks!
#2
I think I managed to solve this one myself, by adding the following line to addnode_fix_subform:
$form_element['#form']['author']['name']['#value'] = $user->name;The only thing is, I'd actually like to hide the publishing and options fieldsets altogether. I was able to accomplish that by changing the lines that remove the submit and preview buttons to be:
foreach (array('preview', 'submit', 'delete', 'author','options') as $name) {$form_element['#form'][$name]['#access'] = FALSE;
}
Unfortunately, doing this breaks the name field fix. Anyone know how I might be able to accomplish this?
#3
I almost forgot, you also need to add $user to the list of globals for addnode_fix_subform.
#4
Thanks for the tip on auto-filling the authoring info.
You should be able to hide the Authoring and Options fieldsets with some CSS:
span.addnode_form div.admin {display: none;
}
#5
I'm also having this issue. Being 30 weeks old, is there any plan to include it in a 5.x version ?
surge_martin
I wonder where to find addnode_fix_subform, the function containing the samples as well as the global list. It would be nice if there was a patch available for those fixes.