[Resolved] Compatibility with Organize Series

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.

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.

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.

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.

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.

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.

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.

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

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.