Ticket #6943 (closed defect: fixed)

Opened 7 months ago

Last modified 4 months ago

Published Pages are set to private after saving

Reported by: imwebgefunden Assigned to: jeremyclarke
Priority: high Milestone: 2.6
Component: Administration Version: 2.5.1
Severity: major Keywords: has-patch
Cc: jeremyclarke, imwebgefunden

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

edit-page-form.diff (0.7 kB) - added by imwebgefunden on 05/09/08 07:05:32.
post.diff (0.5 kB) - added by imwebgefunden on 05/09/08 07:06:02.
trunk_fix_page_permissions_jun2.diff (2.8 kB) - added by jeremyclarke on 06/02/08 23:16:46.
Trunk june 2: fix page status permissions and page form

Change History

05/09/08 07:05:32 changed by imwebgefunden

  • attachment edit-page-form.diff added.

05/09/08 07:06:02 changed by imwebgefunden

  • attachment post.diff added.

05/09/08 18:07:58 changed by ryan

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.

06/02/08 23:16:06 changed by jeremyclarke

  • cc set to jeremyclarke, imwebgefunden.
  • keywords changed from edit pages, published pages, publish_pages, edit_published_pages to has-patch.
  • 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.

06/02/08 23:16:46 changed by jeremyclarke

  • attachment trunk_fix_page_permissions_jun2.diff added.

Trunk june 2: fix page status permissions and page form

06/02/08 23:20:18 changed by jeremyclarke

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

06/03/08 06:44:41 changed by ryan

(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

06/16/08 20:44:30 changed by ryan

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

(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

07/15/08 16:24:07 changed by ryan

  • milestone changed from 2.5.2 to 2.9.

Milestone 2.5.2 deleted

07/30/08 20:36:24 changed by westi

  • milestone changed from 2.9 to 2.6.