Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
node system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Dec 2009 at 04:57 UTC
Updated:
3 Jan 2014 at 01:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
marcingy commentedIf an attempt is made to amend an author it will fail because of this piece of logic
In that an existing node will always fail the second part of the if statement. D6 makes no check at all except for user_access which in theory could see a node assigned to uid = 0. My intial thoughts are that we should split out the if statement into 2 checks so as if we don't find a name we don't overwrite the existing uid. Patch attached.
Comment #2
marcingy commentedOn second thought this really is critical as the idea that a node can never change ownership after creation is a pretty fundamental flaw.
Comment #3
zenith.thepeak commentedyeah, i have tried the code and i am able to Change the Author name.
Its working
Comment #4
int commentedThe "Assigned to", is to tell that person is working in one patch, and not testing.
Comment #5
bleen commented...and the issue title should describe the problem (even after a potential fix has been identified)
Comment #6
bleen commenteda) the patch in #1 needs to be created relative to the root of the Drupal install (not modules/node). I rerolled the patch from #1 to reflect this
b) the patch seems to fix the problem - woohoo!!!
c) I am concerned about this line in the comments above the lines being patched though:
What "other means"? If contrib modules (for example) are assigning a $node->uid, but not a $node->name then this change will cause that to stop working. I can imagine "devel generate" might do this. Gonna check... but I'd love to hear from someone else on this. I may be completely wrong here.
Comment #7
matt2000 commentedI created this bug in #398110: node_submit resets $node->uid ... sorry... It was first reported there. Moshe makes the solution clear in the comments: node_submit needs to go away completely. I've been meaning to write the patch, but haven't got to it yet.
Comment #8
dries commentedIf this code is correct, the PHP comment directly above should be updated.
Comment #9
matt2000 commentedThe PHP comment is removed in the new patch provided in the original issue queue.
Comment #10
David_Rothstein commentedLooks like this was all fixed by the latest commit at #492186: Authoring information is never updated., although the bug report here was older.