Closed (fixed)
Project:
Hosting
Version:
6.x-0.4-alpha3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2010 at 22:19 UTC
Updated:
12 Jun 2014 at 08:59 UTC
Jump to comment: Most recent
Just noticed that all the sites I'm creating are authorless. I'm not sure if this code is new or not, but I think it's caused by this snippet in hosting.module:
// Remove additional UI added by core modules, that conflict with the hosting UI.
$node_types = array('site', 'platform', 'server', 'client');
foreach ($node_types as $type) {
if ($form_id == $type . '_node_form') {
unset($form['options']);
unset($form['menu']);
unset($form['revision_information']);
unset($form['author']);
unset($form['comment_settings']);
// because these aren't really posts, 'preview' doesnt make sense in this context.
unset($form['buttons']['preview']);
}
}
I think when the author field is unset, drupal won't use the defaults. I've only tested this on site nodes, but I assume the same will happen on all. The attached patch fixes this by setting the uid for the node in the presave nodeapi hook. Not sure if this is the best, or right way to go about this.
| Comment | File | Size | Author |
|---|---|---|---|
| hosting_node_author.patch | 784 bytes | hadsie |
Comments
Comment #1
Anonymous (not verified) commentedI don't know if it's a big deal, but I suppose now that I have committed #767008: New users aren't associated properly with their respective client nodes on site signup, we should probably be consistent with the rest. And this patch works.
This was also patched against what looks like CVS, from inside the 'hosting' level directory - which is ancient code. Please patch against the hostmaster repo in git.aegirproject.org in future if you can - thanks! (granted we don't make it too obvious :) )