Make WordPress Core

Opened 16 years ago

Closed 15 years ago

#6391 closed defect (bug) (fixed)

Can't post comments from '?comments_popup'

Reported by: s1m0nd's profile s1m0nd Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.5
Component: Comments Keywords: has-patch
Focuses: Cc:

Description

Unable to post new comments when viewing comments in 'popup' presentation. Having submitted a comment, WP presents a blank screen (host/wp-comments-post.php).

The functionality was working in WP2.1. But none of my v2.3 installations works; it fails in both RCs for WP2.5; and my former blog hosted at wordpress.com fails too.

To reproduce:

  • do a virgin installation of 2.3 or 2.5
  • go to /?comments_popup=1. As expected, WordPress will show all comments attached to post #1 (ie the normal Mr WordPress comment), with form to submit new comment.
  • enter a comment, press 'submit' button.
  • screen will return blank.

Attachments (1)

6391.diff (5.2 KB) - added by DD32 15 years ago.

Download all attachments as: .zip

Change History (6)

#1 @s1m0nd
16 years ago

Clarification: this seems to be login-related.

If I log out, and attempt to comment as an ordinary user (submitting my name, email), it works. But if I log in, and attempt to post a comment (with name, email etc stored in the login), it fails... giving me the blank wp-comments-post.php

I am still able to post comments normally, when I view the post in question in non-popup mode (eg single.php).

#2 @mrmist
16 years ago

The default theme seems to be ignoring / not processing the redirect for logged in users.

I tried moving the

<input type="hidden" name="redirect_to" value="<?php echo attribute_escape($_SERVERREQUEST_URI?); ?>" />

Code outside of the if block for the logged in / not logged in user check, but it made no difference, the page still did not redirect with a logged-in user.

Remains an issue in 2.6.1.

#3 @ryan
15 years ago

  • Component changed from General to Comments
  • Owner anonymous deleted

@DD32
15 years ago

#4 @DD32
15 years ago

  • Keywords has-patch added

attachment 6391.diff added.

  • Moves the hidden form elements that are needed (Post ID and redirect) from non-user-commentor block to common location
  • Moves header to before loop, So if you access ?comments_popup=<non-existant-post-id> you'll be greeted with a stylish header instead of just a random WP footer message
  • Added error message for if no posts existed for current query
  • Applies to both Default and Classic themes

#5 @ryan
15 years ago

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

(In [9336]) comments-popup template updates from DD32. fixes #6391

Note: See TracTickets for help on using tickets.