Author's IP changes to admin's one when editing and saving nodes

yngens - February 23, 2007 - 22:01
Project:IP to Country
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi,

Drupal saves author's IP address of every node into database. And since not mane Drupalers use those IP address the problem described in the subject of this post may seem not that significant. However, when ip2cc module is activated and users see country flags under every node and every comment, it becomes very uncomfortable for admins to edit anything. Because every time they edit any node or comment IP address of the initial poster changes to the one of editing admin. And what is terrible this is seen by the users and they are often confused about which country that or another user.

I strongly believe that core node module has to be changed in the way when the firsts posters IP never changes or changes only the post has been reassigned to another user. Simple editing of any node or comment by administrator should not change the initial posters IP.

I think this is a serious issue.

#1

yngens - February 24, 2007 - 11:34

Similar issue had been discussed here http://drupal.org/node/117462 on comment mover module's issues. But since not only comments, but also nodes change their IPs when edited, this problem is related more to Drupal's node (or probaly user) system itself than to any contributed module.

#2

yngens - April 29, 2007 - 19:44

Apparently nobody cares about IP addresses :(

#3

DanielTheViking - June 10, 2007 - 11:28

Subscribing.

#4

Gurpartap Singh - January 15, 2009 - 14:54
Version:5.1» 7.x-dev

I don't think node.module does any storing of IP addresses. Are you talking about statistics module, or is it IP2CC module's feature?

#5

j.somers - April 22, 2009 - 19:24
Project:Drupal» IP to Country
Version:7.x-dev» HEAD
Component:node system» Code

This is not part of the Drupal node module but the ability to store the host name is part of the IP to Country module. The IP to Country module implements hook_update(). Giving it a quick look I would say this implementation can be completely removed from the module.

#6

mrfelton - April 23, 2009 - 07:05

ip2cc stores details of the posters IP in it's own database table, and has nothing todo with any IP address stored by node.module. i2cc does use hook_update, and I see no need for it (I'm guessing that the original author of this module didn't realise about hook_updates existence, since he used it to build a form) however, this has nothing todo with the updating of IP address on node edit, which as far as I can see was a deign decision... I'll need to give it some more thought before changing the way this works.

#7

mrfelton - August 9, 2009 - 16:34
Status:active» fixed

Updated to only save the IP information once - on first creation of the node.

#8

System Message - August 23, 2009 - 16:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#9

DanielTheViking - August 23, 2009 - 21:02
Version:HEAD» 6.x-1.1

FYI - I filed a feature request against D7 with reference to this post here:

"Keep current authors IP address when others edit the node"
http://drupal.org/node/557340

PS. I guess the fix in #7 was done against 6.x-1.1? Changing the version to reflect that, even if this issue is closed.
(This issue was originally filed against 5.x in 2007. Re-open if a backport is still needed.)

 
 

Drupal is a registered trademark of Dries Buytaert.