Seeing Deprecated Issues: Causing problems with updating other Plugins / Themes
I noticed recently, especially after upgrading to WP 5.0, that I wasn’t able to update some plugins and themes. I was being sent to: /wp-admin/undefined after I tried.
So after activating: define(‘WP_DEBUG’, true); in wp-config.php it displayed these two issues.
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; liveDrafts has a deprecated constructor in /home/xxxxxx/public_html/wp-content/plugins/live-drafts/liveDrafts.php on line 26
Deprecated: Function create_function() is deprecated in /home/xxxxxx/public_html/wp-content/plugins/live-drafts/liveDrafts.php on line 187
When I deactivated Live Drafts, the issue went away and I was able to update the plugins and themes (that had been giving me a problem).
I’m hoping you are still supporting the plugin, at least to correct issues like this (asap). Please let me know and if you will be able to correct this, do you think you will be able to address it soon?
Thanks,
Gary
Notice: Undefined index: post_type in /nas/content/live/wrdsb/wp-content/plugins/live-drafts/liveDrafts.php on line 71
This is line 71 (and above and below a couple):
// Only continue if this request is for the post or page post type
if (!in_array($_POST[‘post_type’], array(‘post’, ‘page’))) {
return $id;
}
I tried disabling all other plugins with the default theme. I’ve tried over-writing the core WordPress files since I was already up to date and I tried a fresh download of the plugin.
Whenever I click “save draft” for a page, I am redirected to the posts admin page. Then when I navigate back to pages, there is no draft page saved.
Help :-/
… at seemingly random times.
]]>Hi,
Since the latest update I’ve noticed that the plugin no longer works for Pages, only for Posts.
Usually when I use this function it reloads the browser page, showing that it’s saving, but keeps me where I am (i.e the edit screen). However, if I’m editing a Page and click the ‘Save Draft’ button it drops me on the Posts page of the Dashboard, and if I then go back to Pages my draft isn’t there.
Thanks for any help you can offer!
]]>Hi there,
This plugin is fantastic! Really helped with a recent project. If you need any help with development or just testing, we’d love to help!
Cheers,
Dave.
]]>Works great except when I preview the page the button disappears! Not much use if I can preview my work before saving.
]]>Tested on 3.8 through to 4.0.1, and rather than saving a draft, my changes are published. Is it just me?
]]>Hi there,
Just installed this plugin. Saved a draft of a page, it seemed to create another version of that page in draft mode, leaving the original untouched.
So at this point, do I go in and edit the newly created draft page, then when I’m ready, hit publish? Does that overwrite the original page and return to 1 total page, not 2?
Or does the new draft become a new page with a new permalink which needs to be updated?
What happens if you save several drafts of a page – does it create a new page for each draft?
Just looking for some information on how this system works so I use it correctly.
Thank you!
Screenshot: https://imgur.com/oLa4wYE
]]>Hi,
This plugin is working excellent on my local machine, but on the remote host it′s not working at all. The only thing I can think of is that on my local machine, DB_HOST is set to ‘localhost’, while my ISP is using ‘databasename.databaseserver’ in wp_config. Can this have anything to do with this issue?
Grateful for answer.
]]>Very useful plugin. Elegantly helps me make changes.
It would be very helpful if scheduled publication worked for live drafts. As it is, a live draft scheduled for later publication is always published immediately regardless of the scheduled publication date.
Any suggestions on how to achieve this?
]]>I wanted to know, since it’s been a while, if this plugin is continuing to be maintained and supported.
Since it’s been almost a year and a half since it’s last update, and WP has had several updates since then, I wanted to just inquire as to the status and if the plugin works with the current version of WP and if the developer is continuing it’s development and maintenance.
Please just provide an update.
Thanks
Gary
Change line 44
if (in_array($post->post_type, array('post', 'page')) && $post->post_status == 'publish') {
to
if (in_array($post->post_type, array_merge(array('post','page'), array_keys(get_post_types( array('_builtin' => false))) )) && $post->post_status == 'publish') {
and line 68
if (!in_array($post->post_type, array('post', 'page')) && $post->post_status == 'publish') {
to
if (!in_array($post->post_type, array_merge(array('post','page'), array_keys(get_post_types( array('_builtin' => false))) )) && $post->post_status == 'publish') {
to enable this for custom post types as well.
]]>Great plugin, looked a high and low working through different plugins that do a similar thing but this is the simplest to explain how to use for a client.
However, one thing would be great that I can’t find in any other plugin would be to have an alert or warning message on the Published post saying there is/are a draft version has been created. This will stop users making changes to the original which other drafts may be based on. In some cases, Person A would edit and update the live page if it were a simple change, simultaneously Person B may be working on a new draft based on an older revision without Person A’s amendments.
Sorry if that sounds complicated, we’re looking into maybe have a Editor’s comments to let multiple users know that the specific page has a new draft but this can faulter based on human error.
Anyway thanks, keep up the good work.
]]>Hi,
When publishing a “Live Draft” our custom data which is serialised get re-serialised by add_post_meta()
Adding the following before add_post_meta() fixes this issue:
$mvalueArr = @unserialize($mvalue);
if($mvalueArr!==false){
$mvalue = $mvalueArr;
}
add_post_meta($newId, $ckey, $mvalue, true);
Thanks
J
We use a the Custom Sidebar plugin to create a series of sidebars for our various pages. When a draft is saved the selected sidebar is listed on the page. When the draft page is published, the live page does not have any sidebar selected. I am aware this is a conflict betweent the two plugins, but any help would be appreciated.
]]>This much-needed functionality should be part of WordPress’s basic functionality. Thanks for creating this plugin. More people need to know about it!
]]>Hello,
Thank you for releasing such an awesome plugin, this really is useful.
I wondered though if you could adjust the plugin so that when someone publishes a live draft the attachments of the draft are moved to the post/page it has just replaced.
It is particular apparent if someone has inserted a gallery, the draft images will appear to ‘disappear’ from the published version.
Thanks
]]>I was encountering a problem where I would save a draft of a post, make my changes, then re-publish, only to discover my post URL had changed.
I eventually tracked this down to line 148 of liveDrafts.php: it uses wp_insert_post to update the existing post, but since it doesn’t declare post_name WordPress uses the default value for the slug.
To cut a long story short, I fixed it by replacing wp_insert_post with wp_update_post on line 148 of liveDrafts.php, since wp_update_post only updates the fields supplied (rather than using the default for unsupplied fields).
I’m posting this in case anybody else has the problem, and also to offer it as a bugfix for future releases.
]]>