Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#7705 closed defect (bug) (fixed)

Current page publishing status not being selected correctly in drop down menu

Reported by: johnhennmacc Owned by:
Milestone: 2.7 Priority: normal
Severity: major Version: 2.7
Component: Administration Keywords: reporter-feedback has-patch
Focuses: Cc:


Because the $post object is not being seen by the page_submit_meta_box function, the "Published" entry is being displayed in the drop-down box and this could result in premature publishing of pages when you save a revision for one that you want to keep as draft. I have attached a patch for this.

Attachments (1)

edit-page-form_php.diff (360 bytes) - added by johnhennmacc 12 years ago.

Download all attachments as: .zip

Change History (7)

#1 @azaozz
12 years ago

  • Milestone 2.7 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Cannot reproduce this, status is being displayed properly. The $post object is passed as argument to page_submit_meta_box().

#2 @johnhennmacc
12 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

While I accept that you cannot reproduce the problem, I can reproduce it on more than one machine and with both the latest nightly build and Subversion revision. It seems that $post is not being passed to the function for whatever reason and I'll need to do some more digging as to why. I'll reopen the ticket in case anyone has anything else to add.

#3 @azaozz
12 years ago

  • Keywords reporter-feedback added

#4 @johnhennmacc
12 years ago

  • Keywords has-patch added
  • Milestone set to 2.7

I think that I now know what was causing this. A (phantom?) $page object was being fed to the do_meta_boxes function in the following line of edit-page-form.php:

$side_meta_boxes = do_meta_boxes('page', 'side', $page);

It should have been fed $post. I am attaching a new patch that supercedes the earlier one.

#5 @johnhennmacc
12 years ago

  • Summary changed from Current page publishing status not being slected correctly in drop down menu to Current page publishing status not being selected correctly in drop down menu

#6 @azaozz
12 years ago

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

(In [8850]) Correct var name in do_meta_boxes() in edit-page-form.php, props johnhennmacc, fixes #7705

Note: See TracTickets for help on using tickets.