Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#2891 closed enhancement (fixed)

Usabiliity: Redirect user to the comment just posted to provide feedback

Reported by: huvet's profile Huvet Owned by: darkfate's profile darkfate
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0.4
Component: Administration Keywords: bg|has-patch bg
Focuses: Cc:

Description

After posting a comment the user does not get any feedback that everything everything worked. The user is set to the top of the page and on a site with lots of content he will be forced to scroll down and look for the comment in the masses.

The solution to this is simple. Redirect the user to the comment just posted. This can be done by changing one line in wp-comments-post.php:

Line 61 from:
wp_redirect( $location );

Line 61 to:
wp_redirect( $location . "#" . $comment_post_ID );

This would be a great usability enhancement.

Attachments (1)

wp-comments-post.php.diff (402 bytes) - added by darkfate 18 years ago.
patch to improve usability

Download all attachments as: .zip

Change History (21)

#1 @Huvet
18 years ago

Ok, that code change does not seem to work after all, I'm sure you get what I'm after anyway.

#2 @darkfate
18 years ago

Yea, I get it.

This would work:

wp_redirect( $location . "#comment-" . $comment_id );

@darkfate
18 years ago

patch to improve usability

#3 @darkfate
18 years ago

  • Keywords bg|has-patch bg added
  • Milestone set to 2.0.4
  • Owner changed from anonymous to darkfate

#4 @tenpura
18 years ago

  • Type changed from defect to enhancement

Is the "comment-" prefix standardized enough? Since what comes after '#' depends on themes, I prefer to do this as a plugin.

#5 @darkfate
18 years ago

Are you sure that is a template thing?

#6 @darkfate
18 years ago

OK, it is in the template, but I think it's a pretty standard way to make comments.

#7 @markjaquith
18 years ago

As long as it uses the standard way used by Default and Classic themes, I'm fine with hardcoding it. If theme authors want that to work, they can follow that convention.

#8 @darkfate
18 years ago

Is this going to be committed into the trunk? If it is, is it going to be in 2.0.4 or 2.1? Or should we get a second opinion?

#9 @darkfate
18 years ago

  • Status changed from new to assigned

#10 @tenpura
18 years ago

While I have checked the theme directory, it seems a pretty much standard way. I see no problem hardcoding it. (Please ignore my previous comment.)

#11 @spencerp
18 years ago

I love the idea, I was just wondering about all this a few weeks ago. =) I'll try this out once and see what happens, and if I decide to make up some themes, I'll surely take this route. ;) :) *It really does suck to have to scroll all the way down the page, especially on lengthy content based blogs sigh. =(

#12 @spencerp
18 years ago

OMFG! I love this!! I just tested it on the localhost, and it works just beautifully.. =D Of course, I haven't tested it without javascript on, but it *shouldn't* need that anyways right? lol.. I would really love to see this added in before 2.0.4. ;) Can someone please post the possible "yays" or "nays" about this.. =/

#13 @matt
18 years ago

We had this before and took it out, because people would not see their comment and submit it again and again.

#14 @spencerp
18 years ago

Oh ok matt.. I must have not noticed it before, because at that "time", I wasn't really posting comments on my own blog lol. =P I'll leave it up on my main blog though for the time being..

#15 @Huvet
18 years ago

matt: What made it _harder_ for them to see the comment if it got focused? Sounds very strange to me. On my site (http://friendlybit.com) I have the comments in the sidebar and since I switched to using this redirect (thanks darkfate) people have stopped complaining. I'm not sure what users you tested this on but mine like it this way.

I suggest you include it into 2.0.4.

I'm all open for other ideas and compromises, I just find it annoying to have to add this in again every time I update. The main problem is that people don't get any feedback that confirms they have posted a comment and that's a BIG problem.

#16 @darkfate
18 years ago

Maybe the redirect I made should be put in and then you can have like a javascript window or something that says "Thank you for posting your comment". Like so:

<script language="Javascript">
<!--
alert ("Thank you posting your comments!")
//-->
</script>

#17 @darkfate
18 years ago

or if you want to do it the valid way! ;)

<script type="text/javascript">
<!--
alert ("This is a Javascript Alert")
//-->
</script>

#18 @darkfate
18 years ago

I guess the javascript would have to be implemented in the template. So I don't think that's possible.

#19 @ryan
18 years ago

  • Milestone changed from 2.0.4 to 2.1

#20 @matt
18 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

This seems to be fixed already in trunk.

Note: See TracTickets for help on using tickets.