Project

General

Profile

Actions

Bug #19627

open

Private Post default Not working?

Added by Laurie Hurson 3 months ago. Updated 30 days ago.

Status:
Assigned
Priority name:
Normal
Assignee:
Category name:
WordPress Plugins
Target version:
Start date:
2024-01-30
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Hi all,

I am working with a professor on this site:

https://urb613sp24.commons.gc.cuny.edu/

The students created draft posts last night but it appears that none of the posts were private by default even though the plugin is running on the site.

https://urb613sp24.commons.gc.cuny.edu/wp-admin/edit.php

I am not sure if the plugin is depricated with new versions of Wordpress? I created a new post to test and it is created as public and when I go to change the visibility I am prompted "Would you like to privately publish this post now?" which seems like a different workflow for privatizing posts compared to the past.


Files

Actions #1

Updated by Boone Gorges 3 months ago

  • Status changed from New to Reporter Feedback

I just had a brief look at the plugin and it appears that it doesn't support the Block Editor. When I test with the Classic Editor, the default is working as expected.

It's not a simple fix to make it work with the Block Editor. I did a few searches of https://wordpress.org/plugins/ to find another plugin that does something similar, but I didn't see anything. Perhaps you could have a look yourself. If we can't find anything, we'll have to decide whether this is a feature it's important to support, since we'd have to build something ourselves.

Actions #2

Updated by Laurie Hurson 3 months ago

Oh man...bummer to hear this does not work with block editor.

I have a professor who was planning to have posts be private by default.

I thought other profs might be using the plugin in this way too but because we have not discovered it was broken in the block editor until now, I wonder how prevalent that use case really is.

I will manually change students posts for now (their first assignment is due soon) but not sure how to proceed otherwise. I can change the default text editor to Classic but that doesn't really resolve the issue.

I think having the option to set all posts to private by default is an important function and affordance for teaching contexts. And I think prof appreciate having this an an option (especially since this feature is the case in LMS platforms). But maybe this is something we should discuss at the group meeting to hear what others think about spending time on creating a more permanent fix.

Actions #3

Updated by Boone Gorges 3 months ago

I think having the option to set all posts to private by default is an important function and affordance for teaching contexts. And I think prof appreciate having this an an option (especially since this feature is the case in LMS platforms). But maybe this is something we should discuss at the group meeting to hear what others think about spending time on creating a more permanent fix.

Yes, I think it's worth more discussion. The obvious strategy is simply to make the entire site private. It's a very specific use case that requires a public site but for all student posts to be private. There's also a further discussion to be had about the broader utility of the "private" visibility level in WP - even I don't fully understand what the feature is meant to do.

Actions #4

Updated by Colin McDonald 3 months ago

I will add this to our agenda for next Friday's meeting. I am also curious about the intended use case or design here Laurie, if you know anything else about it. Are there other aspects of this site that should be public, and it's only the student posts that should be private? Are the student posts going to be public eventually? Is there any sense to a public site / private group (or vice versa?) setup?

Actions #5

Updated by Laurie Hurson 2 months ago

HI All,

Collecting some thoughts here on the affordances offered by default private post, and it's utility beyond the default site visibility settings.

The obvious strategy is simply to make the entire site private.

This could work if the professor is okay with all students seeing one another's posts. However, we have there are instances in which professors do not want students seeing each others' writing all the time. One professor used default private posts as a way for students to keep private journals during the semester, and a few times throughout the semester the students changed the settings to post "publicly" to the whole course. The ability to facilitate private writing between professor and students is the most common use case, and may be more widely used than we know? (what are the plugin stats?) The most recent professor wanted students to write privately to hone their ideas, and then use the group space in google docs to engage collaborative writing and built out projects.

So in this use case above, making the course "private" does not necessarily allow the professor to do what they imagined. I'll also add that this plugin is, I think, the only mechanism the Commons offers for private assignment submission through a site (or group?).

It's a very specific use case that requires a public site but for all student posts to be private

This is actually very common now with folks teaching OER courses on the Commons. Many of the OER faculty programming requires the creation of an "open" aka public course, with openly licensed public materials. In best case scenarios, faculty host content on the commons but also involve students on the Commons. In these cases, many faculty set the site visibility to public and create a password protected page for the blog posts.

Actions #6

Updated by Boone Gorges 2 months ago

Thanks for this, Laurie. In part this helps me to understand what "Private" means: visible only to the author and to the site's administrators. In my opinion this is not very clear in WordPress itself. But it does seem like a useful feature in the situations you describe.

Let's discuss this at our Friday meeting. But from the development point of view, it's not worth a ton of debate. It's not a huge technical lift to make a version of private-by-default that works with the block editor. So if there's general agreement that the workflows that Laurie describes are ones that we want to support and encourage, then let's go ahead and build it.

Actions #7

Updated by Colin McDonald 2 months ago

We went over the background and pedagogical use cases here (thanks for laying them out, Laurie!) during the monthly meeting today and decided to move ahead with the manageable task of building the feature for a post that is private to only the author and site administrators.

I'm adding some watchers here so we can track development and update documentation as needed when this is ready.

Actions #8

Updated by Boone Gorges 2 months ago

  • Category name set to WordPress Plugins
  • Status changed from Reporter Feedback to Assigned
  • Assignee set to Jeremy Felt
  • Target version set to 2.4.0

We went over the background and pedagogical use cases here (thanks for laying them out, Laurie!) during the monthly meeting today and decided to move ahead with the manageable task of building the feature for a post that is private to only the author and site administrators.

For clarity, the feature we're building is: When the private-post-by-default plugin is activated, 'Private' will be the default selection when creating a new post in the Block Editor. The plugin private-post-by-default has not been updated in 12 years, so we will simply fork the existing plugin and add the functionality there.

Jeremy, I'm tentatively assigning this to you. Should just be a matter of setting up the necessary build tools in the plugin, and then loading a component into the Block Editor that sets the initial state when we determine it's a new post creation. I'm not sure whether WP has a method to do the latter - we might have to check for 'auto-draft' status, or to see whether getEditedPostId() is empty. If you've got the resources to tackle it in the next month or two, please do so. Otherwise I'll tackle it later in the release cycle if you don't have the hours.

Actions #9

Updated by Jeremy Felt about 2 months ago

When you think something is going to be easy... :)

It is effectively an intentional design decision to privately publish posts as soon as the private visibility option is selected. This must all be due to the block editor's immediate reaction to state change in the UI. "Draft", "Private", and "Publish" are all post status settings. There is no actual equivalent for "Draft + Private".

In the classic editor, state was really only changed when everything was sent to PHP. The old Private Post Default plugin took advantage of this by wrangling the UI every time the page loaded to make things appear as if they were "new + private" rather than published.

In the block editor, as soon as JS is used to set the status to private, it is immediately published.

So. I think the answer gets a little more complicated.

I'm starting to think of an additional field in the sidebar that is an override of sorts for the published state: public or private. Then, a pre-publish checklist item that describes what will happen: "This post will be published privately."

I think we can chat through expectations a bit during tomorrow's call.

Actions #10

Updated by Jeremy Felt about 1 month ago

I have a branch up with a new CAC Private Visibility Default plugin: feature/private-posts-by-default

When activated, this plugin adds a checkbox (screenshot attached) to publish a post as private. The status of this checkbox has no impact when in draft mode, but will change the status to private just in time if checked when the post is published or updated.

The two spots where post visibility is displayed normally are hidden with CSS.

Actions #11

Updated by Boone Gorges 30 days ago

  • Assignee changed from Jeremy Felt to Boone Gorges

Approach looks clever to me. We'll get this ready to test on cdev in the upcoming weeks. Reassigning to myself so I don't forget to do the necessary merging.

Actions

Also available in: Atom PDF