WordPress.org

Ready to get started?Download WordPress

Forums

Editorial Calendar
[resolved] Compatibility with Organize Series (13 posts)

  1. me@michaelsheridan.com.au
    Member
    Posted 1 year ago #

    Hello

    I have found when I drag and drop posts between days, I lose the data for that post for Organise Series. It would be nice if this could be preserved, but it might also make more sense if some feature for series management was actually built in to Editorial Calendar.

    There is a link to my blog below where I use series extensively.

    Thanks

    Michael
    http://michaelsheridan.com.au/

    http://wordpress.org/extend/plugins/editorial-calendar/

  2. Zack Grossbart
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Michael,

    I'm not familiar with Organise Series. Can you tell me a bit more about it? What does it do? What do you mean that we lose the data?

    Thanks,
    Zack

  3. me@michaelsheridan.com.au
    Member
    Posted 1 year ago #

    Hi Zack

    Their plugin page is here: http://wordpress.org/extend/plugins/organize-series/

    Easiest, however, if I show you what it does. This is a series I wrote on another plugin: http://michaelsheridan.com.au/series/worthless-plugin-for-wordpress/

    The blue box floating in the top right of the body shows on all listing pages. If you click on a post, there is a similar box inside that lets you navigate between post in the same series, and more navigation at the bottom of the post body.

    In the admin area, there is a panel on the post to control things like the sequence. The problem I am having is that the data, associated with which series the post is part of and its place in the sequence, is lost when I use editorial calendar to move it to a new day. I hope this makes sense?

    I think that series navigation actually compliments what you are already doing, which is why I think it could work as a new feature in Editorial calendar.

    Regards

    Michael Sheridan

  4. Zack Grossbart
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Michael,

    Thanks for the extra details. The Editorial Calendar doesn't store any extra information about posts and it only changes the dates, status, title, and content.

    I'm not sure where Organize Series stores the information about which posts connect in a series. My only guess is that they are mapping the post time to the series data in another table, but I'm not sure why they wouldn't just use the post ID.

    It sounds like this question might be better for their support forum.

    Good luck,
    Zack

  5. me@michaelsheridan.com.au
    Member
    Posted 1 year ago #

    Hi Zack

    Thanks for taking a look at the problem. I will put a question to them about it now. I came to you first because I thought you might want to consider it a feature for the future development, if it is technically productive.

    Thanks again for the assistance.

    Michael

  6. Darren Ethier (nerrad)
    Member
    Posted 1 year ago #

    Zack, Organize Series hooks into the custom taxonomy system of WordPress. Does Editorial Calendar support WordPress custom taxonomies?

    The Series part info is saved as a post custom field. So Organize Series is using all WordPress API for saving its information.

  7. Darren Ethier (nerrad)
    Member
    Posted 1 year ago #

    I think I may have found the problem

    on line 1258 to 1260 of edcal.php (version 2.5) is the following:

    do_action('edit_post', $edcal_postid, $post);
    do_action('save_post', $edcal_postid, $post);
    do_action('wp_insert_post', $edcal_postid, $post);

    This means that any other plugins hooking into the edit_post, save_post or wp_insert_post actions are ONLY getting what is in the $post object that is provided by editorial calendar. If that post object doesn't include any of the custom_field data or the custom taxonomies then these plugins will not be able to do anything (and potentially have the taxonomies reset). I'm not saying this is definitely the problem but highly possible and would point to a fix.

  8. Zack Grossbart
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for digging into it, but I'm doubtful that this is the problem. These calls are a standard way to save posts and WordPress makes the same calls all over the place.

  9. Darren Ethier (nerrad)
    Member
    Posted 1 year ago #

    I realize these are standard wp_hooks. However, you are using it in a different manner than WP uses. When you set the hooks up in that location all that is available to the caller is the $post_id and the $post object. With WP's usage, the hook is called when there is also a $_POST array available from the add/edit post screen (which includes other things such as set categories, custom taxonomies, custom fields etc.)

    There is no other information available for that post in Editorial Calendar's usage. In most cases this would be fine because if the caller needed other info (such as the taxonomies attached to the post etc. then it would just use the relevant WP function to pull that info. However, in my case (and probably some other plugins cases, we are EXPECTING the $_POST array to have other info. Particularly in my case, because it is possible for users to remove a post from a series (we check to see if $_POST['post_series'] is empty and compare it with the current series attached to the post, if empty then we remove the post from series). BUT since you use the do_action('save_series') hook in a context that doesn't contain the extra $_POST array information ANY post running through Editorial Calendar's saves is losing any series data.

  10. Darren Ethier (nerrad)
    Member
    Posted 1 year ago #

    I'm just pointing out the problem... I'm still trying to think of a solution, either on my end or your end. But at least wanted to record what I think is the cause of the problem so other minds can be thinking about a solution too :)

    BTW, I love your editorial calendar plugin, I use it on other sites - of course I've never noticed the series problems before because typically I use the editorial calendar for just planning basic post ideas.

  11. Darren Ethier (nerrad)
    Member
    Posted 1 year ago #

    the other thing I noticed is AFTER your implementation of the do_action hooks. You run wp_update_post(). Are you aware that wp_update_post() in turn triggers wp_insert_post which in turn has the do_action('save_post') and do_action('insert_post') hooks in it. So really, there's no need for you to add your do_actions.

    Anyway, just thought of a possible solution, I'll run an isset check for the $_POST key I'm looking for. If it's not present then I'll skip the Organize Series stuff - I still think Editorial Calendar doesn't need those do_actions tho

    Anyways me@michaelsheridan.com.au, can you try this in your install of Organize Series:

    On (or around) line 439 of the file orgSeries-taxonomy.php you'll see the following line:
    if ($post->post_type == 'revision' || ( isset($_GET['bulk_edit_series']) && $_GET['bulk_edit_series'] == 'bulk' ) ) {

    Change it to:

    if ($post->post_type == 'revision' || ( isset($_GET['bulk_edit_series']) && $_GET['bulk_edit_series'] == 'bulk' ) || !isset($_POST['post_series']) ) {

    Try saving and editing posts that are part of a series via the regular post interface and make sure nothing is broken. Then you can try the post within editorial calendar and see if this fixes the problem you were having.

    If it does, let me know and we'll work this fix (or something similar) into the next release of Organize Series.

  12. me@michaelsheridan.com.au
    Member
    Posted 1 year ago #

    Hi Nerrad
    I made the change. Tested it several times. Problem fixed.

    Thankyou for the response.

    Michael
    http://michaelsheridan.com.au/

  13. Zack Grossbart
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Guys,

    Thanks for digging into this. I'm glad you were able to find a solution.

    Best,
    Zack

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.