This plugin is incompatible with the new FSE functionality.
I created an Issue on GitHub as well as a PR solving this issue:
Issue: https://github.com/nb/shareadraft/issues/5
Pull Request: https://github.com/nb/shareadraft/pull/6
I’m trying to use this plugin with custom post types.
I found this solution from about 4 years ago: https://www.ads-software.com/support/topic/custom-post-type-support-solution/
But it seams like this is only half of the solution. Although code adds the draft from other post types to the “Choose a draft” dropdown, the generated share links show the 404 Not found error page.
Is there a solution on how to use this with other post types?
]]>Is there a limit to how many drafts one may share?
I am posting 10 drafts I need to share but the “Choose a Draft” drop down menu only displays 5 of them.
How do I increase the limit and show all my drafts?
Thank you in advance for your help.
]]>We had an issue with an interaction with co-author’s plugin, such that no posts were shown to share for either “My posts” or “Other’s posts”
Fix we put in place was to change the “other’s posts” to just specifically exclude “my unpublished.” rather that search on ‘not my authorship’ because of the plugin interaction posts with a specifically selected author, were not coming up as “mine” but also were not returned with the existing query
‘author’ => -$current_user->ID,
$others_unpublished = get_posts(array(
'post_status' => $unpublished_statuses,
'exclude' => array_column($my_unpublished, 'ID'),
//'author' => -$current_user->ID,
'suppress_filters' => false,
'perm' => 'editable',
));
]]>
I was bitten by the same problem reported by @mskogly in https://www.ads-software.com/support/topic/few-posts-listed/ and I’ve found a solution.
I don’t know how to contribute code to the plugin (or if I even can), so I’m just sharing the changes I did. The calls to get_posts() inside the get_drafts() function should specify an unlimited number of results (‘numberposts’ => -1). The function should remain like this:
function get_drafts() {
global $current_user;
$unpublished_statuses = array( 'pending', 'draft', 'future', 'private' );
$my_unpublished = get_posts( array(
'numberposts' => -1,
'post_status' => $unpublished_statuses,
'author' => $current_user->ID,
// some environments, like WordPress.com hook on those filters
// for an extra caching layer
'suppress_filters' => false,
) );
$others_unpublished = get_posts( array(
'numberposts' => -1,
'post_status' => $unpublished_statuses,
'author' => -$current_user->ID,
'suppress_filters' => false,
'perm' => 'editable',
) );
$draft_groups = array(
array(
'label' => __( 'My unpublished posts:', 'shareadraft' ),
'posts' => $my_unpublished,
),
array(
'label' => __( 'Others’ unpubilshed posts:', 'shareadraft' ),
'posts' => $others_unpublished,
),
);
return $draft_groups;
}
]]>
I’ve been using this plugin for a while now since my site worked on WP 4.9 y wasn’t aware that it doesn’t work with 5.x.
Thats a shame. Excellent plugin…
]]>In the latest version of WordPress, the draft links go directly to 404.
Please help.
Has something changed with wordpress/this plugin? I lists 5 unpublished posts (but there are 28). Under Others unpublished posts, only 3 are listed. There are 49.
]]>The topic about custom post type support was closed so I have to open a new one.
Here is the solution:
add_filter('pre_get_posts',"my_custom_shared_drafts");
function my_custom_shared_drafts($query) {
if(!is_admin()) return;
$screen = get_current_screen();
if($screen->base != "posts_page_shareadraft/shareadraft") return;
$query->set('post_type',array('post','recipe'));
}
You should add this to your child theme functions.php or your custom plugin. Of course replace “recipe” with your custom post type slug.
]]>I have a post which is broken into pages. The first page is viewable, the subsequent pages are not. How can I share the entire post?
]]>Hi, I have the plugin translated into German.
Here is a link to download the files.
https://cloud.elaon.de/public.php?service=files&t=09c4fd0a820c749e3907d0594474bbc6
greetings alex
]]>I shared a draft with a friend and I set the timeout for 3 hours.
However, 10 hours later, that draft is still there.
How do I delete this shared draft from the system/database??
]]>Share a Draft 1.4
Not sure if comments are support but the comments dialogue does come up with the draft document view. If you click “Submit Comment” then the page goes to wp-comments-post.php but then stays blank and no comments are submitted. It makes no difference whether one is logged into WP or not
]]>Not sure if I can supply any more useful info than the topic title and the following error messages. Let me know if so!
Notice: WP_User->id was called with an argument that is deprecated since version 2.1! Use WP_User->ID instead. in wordpress/wp-includes/functions.php on line 2923
Notice: load_plugin_textdomain was called with an argument that is deprecated since version 2.7 with no alternative available. in wordpress/wp-includes/functions.php on line 2925
Chris.
]]>I am drafting a PAGE to share with someone.
Would like to do that.
I use “Private” posts to share with any friends.
Please, add official support for share private posts.
For me, i change this line, and work, i make anything wrong?
$query = $wpdb->prepare(“SELECT ID, post_title FROM $wpdb->posts WHERE post_type = ‘post’ AND post_status = ‘private’ AND
Very thanks!
]]>I need to return the shareadraft link for a specific post at runtime, is there anyway to do this ? something link
$publicURL = ShareADraftLink(‘postID’);
?
thanks
]]>Upgraded to 3.4.2 and Share-A-Draft urls will not resolve for a visitor not logged in. Firefox and Safari both report “too many redirects.”
]]>I was excited when I saw this plug-in. Just what I need! But unfortunately I need it for a custom post type, which doesn’t appear to be supported. I hope you will consider it as a future enhancement.
]]>I don’t see any idea on how to even start using this plugin. Where do I begin? How do I do this?
]]>Hi,
this plug in seems to be exactly what I need, thank you for developing it.
Unfortunately, I can’t get it to work properly. Everything seems very straightforward, but the URL that is generated just leads to this format https://mysite.com/?p=****
which is the exact same link I can get just by previewing a draft (without needing the plugin).
This isn’t viewable by someone who isn’t logged in.
Have I picked it up wrong, does the recipient need to have an account and be logged in to view these drafts?
Many thanks,
Philip.
Will it be possible to add a meta box to the “edit post” page to share the draft for that post?
This will make it quicker and more intuitive the usage.
Just something you click on and the draft is added to the “shared” list and the share url displayed below.
Would be great if we were also given the capability of sharing draft *pages* (not just posts).
]]>Works NOT with WP 3.1.3 multiblog!
]]>I translated shareadraft in french (fr_FR). Who should I contact to get it added to the downloadable plugin?
]]>This is a SexyBookmark (Version 3.3.6) problem but it affects Share a Draft. The draft isn’t shown (no content is, such as title or author), SexyBookmarks do show, and I get a bunch of the following errors:
Warning: strpos() [function.strpos]: Offset not contained in string in /home/myaccount/public_html/site/wp-content/plugins/sexybookmarks/includes/public.php on line 209
I’m using WordPress 3.1 and Share a Draft 1.3.
Everything was fine until version 3.1 I believe, so it could just be an incompatibility between Share a Draft and WP 3.1.
]]>Content of the post is empty…
]]>It turned out that the link of the format
https://HeikoBehrens.net/?p=postId&shareadraft=shareADraftKey
was the reason for an an infinite 301 redirect loop with WP 3.0.1 and ShareADraft 1.3
HTTP request sent, awaiting response… 301 Moved Permanently
This might be caused by some other SEO plugins. I changed the shareadraft.php on line 241 to reorder the URL parameters and everything works fine, now.
Before:
<td><?php echo get_bloginfo(‘url’); ?>/?p=<?php echo $p->ID?>&shareadraft=<?php echo $share[‘key’]; ?></td>
After:
<td><?php echo get_bloginfo(‘url’); ?>/?shareadraft=<?php echo $share[‘key’]; ?>&p=<?php echo $p->ID?></td>
Hope this can help anybody in the future.
]]>