Option to keep chronological order (by keeping CID)

juan_g - October 21, 2009 - 21:44
Project:Comment mover
Version:HEAD
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:by design
Description

About how Comment Mover works, the current maintainer explains:

"When you move a comment with comment mover, it does not actually move the comment. It leaves the comment, copies the information and creates a NEW comment on the new node, then changes the old comment to show a link to the new one."

This means that moved comments get a new CID. If you use flat mode, they will be ordered at the end like new comments, even if they are older than other comments in the destination node (comments are ordered by CID). This breaks chronological order .

There is a new, convoluted solution for this, Orderable flat comments, ordering each comment by hand, one by one, making it child of a previous comment to appear ordered by date when using flat mode.

I think a much better solution -which I've seen in other software- would be a Comment Mover option to keep CID by, instead of copying, really moving the comments (changing NID -node ID- but keeping CID -comment ID-). In this way, all moved comments keep chronological order automatically, without need to order each one by hand.

This would be similar to the Workaround to move comments with phpMyAdmin, but made from within Comment Mover, with the additional possibility that Comment Mover could still optionally leave links to the new locations in the original nodes, but changing the link CID, not the comment CID.

An excellent solution would be to provide three options for Comment Mover:

  1. [Current behavior] Copy the comment to a new comment, and leave a link in the old comment. (That is, ordered links, unordered comments).
  2. Really move the comment, and create a new comment in the old node with just a link. (That is, ordered comments, unordered links).
  3. Really move the comment, without leaving a link. (That is, ordered comments, no links).

(In my case, I would use the #3 option).

Some related Comment Mover issues are:

The reply was "by design" or "duplicate", excepting for the "orderable flat comments" solution (see the last issue). However, I think it does not need to be by design at all. This feature would be added as one or two options (#2, #3), keeping the old behavior as one of the options (#1).

Thank you for considering this feature.

#1

dragonwize - October 22, 2009 - 14:13
Status:active» by design

Your assumption is that everyone wants to have chronological order and never any other order. Also, you assumption leaves out those that wish to leave a redirect or a link to the moved comments.

Orderable flat comments in Comment Mover 2.x will give the admin the ability to order and place comments in any place they want for any reason they want. Full control.

...ordering each comment by hand, one by one, making it child of a previous comment to appear ordered by date when using flat mode.

Again you are making an assumption base on your own needs. The majority of comment mover users I have questioned have asked for comments just to go to the bottom of the new comment stack. However, the method that we have chosen going forward with 2.x does not just support one group or methodology, it gives admins the ability to do what they would like.

You are also not taking into consideration all of CM's functions. CM not only moves comments from one node to another, it also converts comments to nodes, converts nodes to comments, and gives the admin the ability to move a comment up or down in the same thread which is not in chronological order.

#2

juan_g - October 22, 2009 - 17:03

> Your assumption is that everyone wants to have chronological order and never any other order. Also, you assumption leaves out those that wish to leave a redirect or a link to the moved comments.

I think that's a misunderstanding. The feature I've suggested is to add two options, so that users have the current procedure as it is now, and other two procedures similar to other software. As I said, two of the options would leave links to the new locations.

However, it's true that I think that most flatcomments users probably prefer chronological order. Possibly part of them prefer another order, and they have the other Comment Mover options.

The point is not less options, but more options available to users to choose from.

> Orderable flat comments in Comment Mover 2.x will give the admin the ability to order and place comments in any place they want for any reason they want. Full control.

That's true, so I think orderable flat comments is a valuable option for some cases, I should have also said that point. The other additional option I'm suggesting (keeping CID) would order comments chronologically, not by hand but automatically. That's very useful for mass comment movement, or to merge forum threads, etc.

> You are also not taking into consideration all of CM's functions. CM not only moves comments from one node to another, it also converts comments to nodes, converts nodes to comments, and gives the admin the ability to move a comment up or down in the same thread which is not in chronological order.

Yes, sorry, I should have said more clearly that I was referring only to moving comments to a different node while using flatcomments.

Thank you for maintaining these two essential modules, comment_mover and flatcomments.

#3

dragonwize - October 22, 2009 - 20:05

The other additional option I'm suggesting (keeping CID) would order comments chronologically...

Let's first be clear that without core hacking or completely overriding the comment system with something like views, it is not possible to truely order comments chronologically in D6 and below. Core orders comments by CID not by time. So for most situations they are the same. However, if you change the time on a comment the order will NOT change. If your time on your server or in your Drupal install gets messed up some how you can not correct the time and fix it. The damage is irreversible at that point. The only thing holding any of it together is that CIDs are issue sequentially.

With that said, in CM 2.x your option will already be available without all the extra work you describe. By using the new "Orderable flat comments" CIDs will be preserved but they will not be displayed in chrono order by default. All you have to do to see comments in CID order is change your comments to the normal "Flat" display option and Drupal will display your comments via flat order.

However, there are some things you can NOT do using that method and the 2 methods can not be mixed. You can not move up or down a queue in any way both in the same queue and when you move to a different comment queue because it will always appear in CID order. The only place you would be able to move a node to a comment would be the bottom of another queue as the CID will be new because there was never an existing CID to keep. If you move a group of comments you can not keep them together in the new queue as they will be mixed in with the other comments by CID so you can easily lose context in replies. And there are probably more issues that I am forgetting, but you get the idea that the method, while already available, is not very flexible.

#4

juan_g - October 22, 2009 - 23:21

Thanks for the reply.

> Core orders comments by CID not by time.

Yes, that's why the suggested feature is an option to keep CID (comment ID) in the Comment Mover settings. What I was trying to explain is that there is a way to move comments to a different node by just editing NID (node ID), and other couple of fields (PID would be 0, thread probably can also be 0 for flat), in the comments table, instead of copying to a new comment with a new CID. (See an old comment about doing this by hand, before Comment Mover was available).

I think this option (changing NID, not CID) wouldn't be too difficult to implement in Comment Mover, at least the option #3 of just moving a comment without leaving a link. That would be useful for a part of the users, like in my case naturally.

> By using the new "Orderable flat comments" CIDs will be preserved

I think you are referring to the part of ordering comments within the same node. Is this correct? If the upcoming CM 2.x preserved the CID during the step of moving to another node, that would be wonderful.

> The only place you would be able to move a node to a comment would be the bottom of another queue as the CID will be new because there was never an existing CID to keep.

Of course this option would not apply to conversions between nodes and comments, but only to move comments to another node, if the optional setting was enabled.

> If you move a group of comments you can not keep them together in the new queue as they will be mixed in with the other comments by CID so you can easily lose context in replies.

That's a reason to have it just as one of the options in the settings, to choose depending on the cases.

However, other software like forum systems I've used have this suggested feature as default when moving posts. For example, I've just again verified that vBulletin (the well-known forum system) moves posts to other threads preserving the post id and the date. Therefore, automatically, the post is ordered chronologically in the new thread. No links are left in the case of vBulletin, and this can be a disadvantage for some, unless the option #2 of this suggested feature was also implemented. But, as I said, #3 (just changing NID, etc.) would be much simpler than #2 and probably enough for many users.

In any case, thank you for having considered this optional feature.

#5

dragonwize - October 23, 2009 - 13:18

I think you are referring to the part of ordering comments within the same node. Is this correct?

No. The CID will be kept on all moves up, down, or to another node. Obviously not converted to or from a node though.

That's a reason to have it just as one of the options in the settings, to choose depending on the cases.

I think that you are still not understanding what I am saying. The "display" of comments is where the "order" is determined. Drupal core 6 and below offer 2 methods to determine comment order, CID and thread. Those two methods are mutually exclusive. You can NOT display some nodes or comments by one method and others by another. The lowest grain control available in core is at the content type level for D6 only, in D5 the setting is global.

If you wish to order by CID you can choose to display via the core "flat" options. However, you can not choose the today to do that and it displays correctly, then tomorrow decide you want full control over a comment in that thread. You get one or the other and never both because the order is determined at display not on move.

unless the option #2 of this suggested feature was also implemented. But, as I said, #3 (just changing NID, etc.) would be much simpler than #2 and probably enough for many users.

Again, there option is not built in to CM this option is part of core in the comment settings. So this feature suggestion is already there.

#6

juan_g - October 23, 2009 - 14:37

I think I see what you are explaining in comment_get_thread of comment.module for the upcoming Drupal 7:

  if ($mode === COMMENT_MODE_FLAT) {
    $query->orderBy('c.cid', 'ASC');
  }
  else {
    $query->orderBy('SUBSTRING(c.thread, 1, (LENGTH(c.thread) - 1))', 'ASC');
  }

> No. The CID will be kept on all moves up, down, or to another node. Obviously not converted to or from a node though.

Oh, sorry, and thank you very much!

 
 

Drupal is a registered trademark of Dries Buytaert.