Ticket #2382 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

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

Reported by: wellsdjohn Assigned to: westi
Priority: normal Milestone:
Component: Administration Version: 2.0
Severity: normal Keywords: search result edit delete bg|has-patch bg|commit
Cc:

Description

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

2382.diff (1.9 kB) - added by westi on 02/03/06 12:05:21.
Patch containing the changes from $id to $post->ID

Change History

02/03/06 12:04:52 changed by westi

  • keywords changed from search result edit delete to search result edit delete bg|has-patch.
  • owner changed from anonymous to westi.
  • status changed from new to assigned.
  • milestone set to 2.1.

This looks good.

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

02/03/06 12:05:21 changed by westi

  • attachment 2382.diff added.

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

02/07/06 10:22:31 changed by markjaquith

  • keywords changed from search result edit delete bg|has-patch to search result edit delete bg|has-patch bg|commit.

02/11/06 09:56:08 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

(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

02/19/06 11:22:30 changed by ryan

  • status changed from closed to closed.
  • resolution set to fixed.

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

02/19/06 11:22:37 changed by ryan

  • milestone changed from 2.1 to 2.0.2.

11/30/06 19:41:50 changed by

  • milestone deleted.

Milestone 2.0.2 deleted