Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#40164 new defect (bug)

Apace HTTP 414 error on deleting comments in bulk

Reported by: garethgillman Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7.3
Component: Comments Keywords: has-patch
Focuses: Cc:


Bit of an edge case, but I just had to delete 3000 comments from a WP site I took on and I was doing them in 200's (so not to over run the server and so I can check for any legitimate comments).

Doing this, the first 200 comments were "spanmmed" fine, but then you do the next 200, it generates a 414 error as the url becomes something like:


Basically for every process it duplicates the url and if you have 100+ ID's in each request, it passes a really long url string

1) Is there a reason why all the comment ID's are passed to the url?
2) Can this be amended so in edge cases, so the 414 error isn't generated as it can and will frustrate some people.

Attachments (1)

40164.diff (757 bytes) - added by bor0 3 years ago.

Download all attachments as: .zip

Change History (3)

#1 @bor0
3 years ago

Steps to reproduce:

  1. Create 400 comments programatically:
    $data = array(
        'comment_post_ID' => 1,
        'comment_author' => 'admin',
        'comment_author_email' => 'admin@admin.com',
        'comment_author_url' => 'http://localhost/',
        'comment_content' => 'Comment content goes here',
        'user_id' => 1,
        'comment_author_IP' => '',
        'comment_agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)',
        'comment_date' => current_time('mysql'),
        'comment_approved' => 0,
    for ( $i = 0; $i < 400; $i++ ) {
        wp_insert_comment( $data );
  2. Navigate to wp-admin/edit-comments.php
  3. Using the screen options, set Number of items per page: 200
  4. Click on Pending (400)
  5. Select Comments and click on Filter.
  6. Bulk select all and apply Mark as Spam action.
  7. Repeat 6.

Error shows:

Request-URI Too Long

The requested URL's length exceeds the capacity limit for this server.
Version 0, edited 3 years ago by bor0 (next)

3 years ago

#2 @bor0
3 years ago

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.