Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#6943 closed defect (bug) (fixed)

Published Pages are set to private after saving

Reported by: imwebgefunden's profile imwebgefunden Owned by: jeremyclarke's profile jeremyclarke
Milestone: 2.6 Priority: high
Severity: major Version: 2.5.1
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

First time this is reported by ticket #6777. A partial fix is in changesets [7750] and [7751]

To solve the final problem, further changes necessary. The attached patches for wp-admin/edit-page-form.php and wp-admin/includes/post.php expand the tests and eliminate the reported problem.

Attachments (3)

edit-page-form.diff (710 bytes) - added by imwebgefunden 16 years ago.
post.diff (551 bytes) - added by imwebgefunden 16 years ago.
trunk_fix_page_permissions_jun2.diff (2.8 KB) - added by jeremyclarke 16 years ago.
Trunk june 2: fix page status permissions and page form

Download all attachments as: .zip

Change History (10)

@imwebgefunden
16 years ago

#1 @ryan
16 years ago

With the post revisioning changes in 2.6, separate edit_published_pages and publish_pages capabilities actually make sense. I think we need to fix this by decoupling private from publish.

#2 @jeremyclarke
16 years ago

  • Cc jeremyclarke imwebgefunden added
  • Keywords has-patch added; edit pages published pages publish_pages edit_published_pages removed
  • Owner changed from anonymous to jeremyclarke

This came up in [7070], and I spent some time looking at the problem to try and figure it out. It turns out that there are several things wrong with the edit-page-form.php file that never really got fixed even though parallel problems were fixed in the edit-form-advanced.php file.

One is that at some point the dropdown menu for post status stopped showing a 'private' status option labeled 'published' and started just using the published option (and controlled the override on the backend). My patch addresses this change for the page form as well.

The other two problems that are adressed in the old patches are also addressed in mine and I think with a bit more subtlety based on my testing for [7070]. .

  • Status should only get shunted if the user can't publish a new page or if they don't have edit_published_pages and it's already published. (in wp-admin/includes/post.php)
  • The publish dropdown menu item should only show if the user can publish pages, or if the page is already published and they can re-publish this page (with the post ID, the edit_page capability takes care of the details).

I also set the privacy checkbox to only show if the user has 'publish_posts' capability to match the posts screen. It may make sense to have a more subtle check for this as well, but I don't really care and I think i'ts more important that pages and posts match.


@jeremyclarke
16 years ago

Trunk june 2: fix page status permissions and page form

#3 @jeremyclarke
16 years ago

Aw crap. I meant #7070, not [7070].

#4 @ryan
16 years ago

(In [8034]) Don't unpublish pages when a user who can edit publised pages but not publish new pages edits a page. Props jeremyclarke. see #6943 #7070 for trunk

#5 @ryan
16 years ago

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

(In [8102]) Don't unpublish pages when a user who can edit publised pages but not publish new pages edits a page. Props jeremyclarke. fixes #6943 #7070 for 2.5

#6 @ryan
16 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

#7 @westi
16 years ago

  • Milestone changed from 2.9 to 2.6
Note: See TracTickets for help on using tickets.