Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2382 closed defect (bug) (fixed)

Edit and Delete buttons do not work within the Manage's search results page

Reported by: wellsdjohn's profile wellsdjohn Owned by: westi's profile westi
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: Administration Keywords: search result edit delete bg|has-patch bg|commit
Focuses: Cc:


Bug Description

The Edit and Delete buttons do not work on posts that are returned from a search query within the Admin/Manage section.

Replicate Bug:

  1. Log into wp-admin
  2. Click on "Manage"
  3. Enter a search term in the "Search Posts..." field (choose a term that will return at least one result)
  4. The Edit and Delete buttons for each found post does not work.

Bug Location:

Lines 53, 54 within /wp-admin/edit-pages.php

Bug Fix:

The links built for editing and deleting are not including the post's ID value. Instead of using:

53:    ...?action=edit&post=$id' class='edit'>...
54:    ...?action=delete&post=$id' class='delete'...

It should read:

53:    ...?action=edit&post=$post->ID' class='edit'>...
54:    ...?action=delete&post=$post->ID' class='delete'...

Attachments (1)

2382.diff (1.9 KB) - added by westi 18 years ago.
Patch containing the changes from $id to $post->ID

Download all attachments as: .zip

Change History (7)

#1 @westi
18 years ago

  • Keywords bg|has-patch added
  • Milestone set to 2.1
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

This looks good.

I've turned the changes into a patch and caught a couple more that needed changing.

18 years ago

Patch containing the changes from $id to $post->ID

#2 @markjaquith
18 years ago

  • Keywords bg|commit added

#3 @ryan
18 years ago

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

(In [3513]) Add new page caps now that pages can be draft or publish. Brings page caps to parity with posts. Add delete caps for posts and pages. fixes #2382 #2336 #2301

#4 @ryan
18 years ago

  • Resolution set to fixed

(In [3555]) Fix edit and delete page buttons. Props wellsdjohn. fixes #2382

#5 @ryan
18 years ago

  • Milestone changed from 2.1 to 2.0.2

#6 @(none)
18 years ago

  • Milestone 2.0.2 deleted

Milestone 2.0.2 deleted

Note: See TracTickets for help on using tickets.