Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the 6.18 -> 61.9 update, a line as follows was added into the node_form_array function.
+ $node->uid = $user->uid;
This has the undesireable effect of removing the uid for new nodes.
It needs this to fix it.
retrieving revision 1.620
diff -u -b -r1.620 node.module
--- node.module 26 Mar 2006 01:03:29 -0000 1.620
+++ node.module 26 Mar 2006 10:55:22 -0000
@@ -1681,6 +1681,8 @@
* Generate the node editing form array.
*/
function node_form_array($node) {
+ global $user;
+
node_object_prepare($node);
// Set the id of the top-level form tag
Comment | File | Size | Author |
---|---|---|---|
#1 | node-global-user.patch | 576 bytes | merlinofchaos |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedRerolled with the global $user right next to where it is used; patch is pretty easy to see, and I'm a dumbass for missing this in my previous patch. Le sigh.
+1 but I'll let someone else RTBC it.
Comment #2
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedapplied
Comment #3
(not verified) CreditAttribution: commented