-
Notifications
You must be signed in to change notification settings - Fork 30
Posts fetched with a query and saved as drafts don't have IDs or other custom meta #21
Comments
This isn't happening in This isn't happening with all stories saved as drafts, either. Here's a list of stories saved as drafts, but without imported metadata:
There's not really any pattern here; these were gotten with different queries on different days. |
Of those stories, "Even In Rich Countries, Jobs Have Returned Only At A 'Painful' Pace" is the only one that was downloaded while verbose logging was enabled.
That's where the line in the log cuts off. |
If a post doesn't exist yet, then in the current version of the plugin, 3c71bc3, the following happens: $post_id is created here and then the meta information from here is set on that post ID here. I'm not sure if this is a problem in the current version of the plugin, or if it was fixed recently, so I'm going to set a bunch of queries, enable logging, and keep an eye on it all afternoon. |
Stories fetched while testing #32 weren't experiencing this problem, so that might be a fix for this. @mike-douglas what do you think? |
This was noticed in function
nprstory_bulk_action_update_action
, whereerror_log( 'updating story for API ID='.$api_id );
was logging an empty ID for posts that were imported by a cron job from an NPR query as drafts. This doesn't affect posts imported as published.The text was updated successfully, but these errors were encountered: