Whenever a comment link refers to a comment that is not on the first page of a thread, the link does not take you to the comment.
More details from http://drupal.org/node/26966 where this problem has been thoroughly discussed (and fixed in D7 but not in D6)....
When you, as admin, set the default number of comments per page, the links to those comments are not updated as they should be.
For example, all links to individual comments still go to /node/x/#comment-x but comment no. x may not be on that page if x is bigger than the number of comments per page. Hence the link is wrong.
This includes links from the 'recent comments' block and also very importantly after someone has submitted a new comment, they should be taken to their comment but if their new comment isn't on the first page then they have the same problem.
This is a *big* problem if you have discussion/comment threads of more than about 100 posts (some threads on my site are over 300 posts) and hence you can't sensibly include them all on one page.
There is a sort of semi-fix in D6 Permalinks module... but we do not yet have a solution for D6 that works everywhere comment links are used (i.e., Views)
Comments
Comment #1
aharown07 commentedComment #2
hgmichna commentedI think we do: #677082: Comment links - JavaScript solution
Comment #3
rmjiv commentedNot sure if this is really the correct issue for this, but here goes.
We have a site that has threaded comments and some of our comment threads run to hundreds of comments. Consequently we have the described problem of figuring out what page a new comment is added on. One of the solutions that we're considering is to introduce the concept of a "comment thread detail page". In essence, it would be a view of a comment, the comment's thread ancestors, and (perhaps) a comment's thread siblings. It may or may not having paging; making it unpaged would be simplest. Even if it has paging, I think it is easy enough to count the total number of comments that would apply to this thread and therefore determine which page an individual comment would appear on.
We haven't worked out all of the details of this idea yet, so be gentle. :)
Thoughts?
Comment #4
andypostintroduced JavaScript solution is not suitable for most sites, subscribe
Comment #6
hgmichna commentedRe: #3 rmjiv - I also proposed this, already a long time ago, in the original thread. I think this proposal points to a better, simpler solution than determining the page number.
However, determining the page number is possible, and it has already been done for Drupal 7, as far as I understand. But it may well haunt Drupal, because all kinds of other code, present or future, may be affected, such as views.
Comment #7
hgmichna commentedRe #4 - andypost:
Why not? Which problems did you have?
My experience is pretty good, particularly in the face of not having any other solution for Drupal up to version 6 and also no other solution for classic links in the form of …/node/[nodenumber]#comment-[commentnumber].
Also this was only designed as a stopgap measure. The whole thing was programmed in a few hours. Compare that to the effort for the Drupal 7 semi-solution, which still fails with classic links (for which I also proposed a full solution).
I'd be interested to hear about any problems with the JavaScript solution.
Comment #8
andypostI agree that this is a real working solution!
Except known problems described in #677082: Comment links - JavaScript solution
which IMO not suitable for common-case (mostly about #2 and #1)
Comment #9
hgmichna commentedOf course, don't use this solution if you have a better one (or if you want to tell us that dead links are your solution).
As far as I can tell, the common case is that (a) links to old articles, that actually require paging, are rarely used, and (b) only few articles have many pages. The largest number of pages on my web sites seems to be something around 3 or 4. Again no problem. It would become a problem only if you
How often does that happen? I haven't seen it anywhere. Can anyone show me an example of a problematic link of that kind anywhere in the real world? And note that it would still work, just a bit more slowly.
Please report, if you have tried this solution. Have you seen any actual (rather than imagined) problems?
I think we should discuss this in its own, separate issue:
#677082: Comment links - JavaScript solution
Comment #10
aharown07 commentedThe javascript solution I tested (if this is the same one discussed near the end of here: http://drupal.org/node/26966 )
isn't suitable for our situation because of the length of time involved... and users not really knowing what's going on while the page repeatedly reloads.
What I asked in that thread, I'll repeat here: is there a way to make the javascript approach quicker and more streamlined if you have threading turned off and set all your content types to the same number of comments per page?
What I'm fishing for is a way for it to calculate the page and go to it rather than scan the page, go the next, etc.
Comment #11
hgmichna commentedSure, technically that is doable. The main problem is that the number of people for whom this would be useful is much lower than those who need a universal solution.
By the way, I have already made a similar two-page proposal to work with classic comment links in issue #679772: Old-school comment URL #fragments still don't display correct page for Drupal 7, which currently still has the problem that it cannot process classic links.
Comment #12
aharown07 commentedNot sure the proper way to ask this but... what might something like I described in #10 cost if I were to try to hire it out? Are we talking about dozens of hours?
Comment #13
hgmichna commentedYou mean a modification to the existing JavaScript program that would allow to calculate the target page from the comment numbers on the first page, then jump there directly?
The actual work is not all that much, perhaps a couple of hours, anyway less than a day. Probably just as much work time would be needed to find out how exactly Drupal behaves when threading is switched off. I wouldn't like to write a program that fails too easily, when the Drupal site in question shows some peculiarities.
If you wanted to encourage or even force users to disable threading, you would have to set the default to non-threaded, which is easy, or you would have to remove the threading option, which requires either an add-on module or a patch or perhaps a specialized or patched theme.
A patch to the Drupal code would have the decisive disadvantage that it would have to be adapted and applied to each new version of Drupal, so a module would be better. The effort of creating a module would be high for me, because I've never done it and don't have the infrastructure in place. Perhaps somebody else would jump in and do that part, while I do the JavaScript part.
Comment #14
aharown07 commentedWell, personally I wouldn't need a module, though I can see why that would be desirable in general. There are only a couple of admins who have access to turn threading on and they know better than to do that so... for us it's a nonissue.
Comment #15
hgmichna commentedAs far as I know, every user can turn comment threading on and off and change some other related settings.
Comment #16
aharown07 commentedThat's all handled in the content type set up, which users cannot access unless they are given necessary permissions... unless you expose the threading options to users. That's also and option in the content type.
We don't allow users to turn that on because we use Comment Mover, which is much more straightforward without threading (we've also found that our forum users are not interested in using threading).... and use Flatforum also. So all replies are to the node.
Comment #17
mau-it commentedsubscribing
Comment #18
jhodgdonJust noting that the comment links from the comment admin overview and comment moderation pages are also incorrect, if the comment happens to fall on a later page of comments and not on the first page. And this is still a problem as of Drupal 6.19.
Comment #19
aharown07 commentedThere's a fix for this now using Permalinks and a couple of patches. The patches have not been committed, but I have been using them succesfully for months. See #886886: Views integration for comment permalinks
Comment #20
jhodgdonDoes that fix the comment admin pages as well?
Comment #21
aharown07 commentedI don't use the admin pages, but just did a little test and it appears that the fix does not work there. I don't know why it wouldn't. In any case, you can use Views to produce the same thing the admin pages display (only much better... more info) and the links there work. The reason we don't use the comment admin page is that Views provides a much better comment management interface (especially with Views Bulk Operations also installed)
Comment #22
jhodgdonThis issue is in the Drupal Core issue queue. Which is to say, it's about comment links in Drupal core, and needs to be fixed in core.
Comment #23
aharown07 commentedYeah, that would be nice.