Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Reported issue pushing to the Story API #61

Open
benlk opened this issue Oct 2, 2018 · 4 comments
Open

Reported issue pushing to the Story API #61

benlk opened this issue Oct 2, 2018 · 4 comments
Labels

Comments

@benlk
Copy link
Contributor

benlk commented Oct 2, 2018

From INN's support inbox: (#2551)

I work for a handful of NPR member stations. We're trying to push out some of our features through a wordpress site, and are having an issue with the stories being added to the API and assigned a number: https://illinoisnewsroom.org/

The issue might come from us having the push and pull type set to post rather than NPR_Story_Type. We need to have it set up this way so we can still have access to the default Screen Options.

An example of a story that should be on the NPR API but isn't can be seen here: https://illinoisnewsroom.org/2018/08/18/kids-with-disabilities-suffer/

The reporting site does have the meta box correctly checked:

screen shot 2018-10-02 at 11 14 26 am 1

As you can see the expiration date is Aug 25, but the story was posted before that date and it still didn't push I can use a more recent story as an example if that would help you better figure out the issue.

The post has a status of publish, according to the API, so this isn't because of custom push statuses.

Just to follow up with a newer story: https://illinoisnewsroom.org/2018/10/02/where-do-illinois-candidates-stand-on-student-debt/

It's a web post with no audio, but all of our partner stations still need to grab the story.

So it's not limited to one post.

Thanks for getting back to me. Attached is the NPR API plugin settings. The API Key and Org ID seem to still work from a core publisher lite site, so I believe those are correct, but if I need a different push/pull URL let me know. When we first started using the plugin we were using HTTP instead of HTTPS, but recently updated that since updating the plugin made an HTTP break the plugin meta box.

I see that the app says "You have no Permission Groups defined with the NPR API."

But again since everything is working in core publisher lite with pushing stories, I'd assume we should also be able to push stories with this in Wordpress. I've spoken with NPR Digital about this and they've said that should be the case, and even when using a different partner station API Key/Org ID, we have the same issues

So it's not a permissions problem.

@benlk benlk added the bug label Oct 2, 2018
@benlk
Copy link
Contributor Author

benlk commented Oct 2, 2018

Currently waiting for Alex Coleman at ilnewsroom.org to get back with server logs during the affected time.

@benlk
Copy link
Contributor Author

benlk commented Oct 4, 2018

The logs he provided cover September 30 to October 3, so they cover the time period when the server was experiencing the problem pushing.

I'm not seeing any errors or notices in the provided log that specifically mention post 1886, https://illinoisnewsroom.org/2018/08/18/kids-with-disabilities-suffer/

Nor do I see any errors or notices specifically mentioning post 2522, https://illinoisnewsroom.org/2018/10/02/where-do-illinois-candidates-stand-on-student-debt/

For post 2294, https://illinoisnewsroom.org/2018/09/25/ask-the-newsroom-the-state-of-state-parks/, the server logs say that the NPR Story API has rejected the post because the "teaser" field needs to be set.

[Mon Oct 01 20:40:28.282784 2018] [proxy_fcgi:error] [pid 6816:tid 140473263773440] [client 128.174.79.58:49428] AH01071: Got error 'PHP message: Error returned from NPR Story API with status code other than 200 OK: Error pushing story with post_id = 2294 for url=https://api.npr.org/story?orgId=4780056&apiKey=MDM5MjE5NTg1MDE1Mjk1MTM5NjlkMzI1ZQ000 HTTP Error response = Bad Request API Error Message = Required teaser field not found.\n', referer: https://illinoisnewsroom.org/wp-admin/edit.php?post_type=post

[Mon Oct 01 20:40:46.085072 2018] [proxy_fcgi:error] [pid 6961:tid 140473607874304] [client 128.174.79.58:49511] AH01071: Got error 'PHP message: Error returned from NPR Story API with status code other than 200 OK: Error pushing story with post_id = 2294 for url=https://api.npr.org/story?orgId=4780056&apiKey=MDM5MjE5NTg1MDE1Mjk1MTM5NjlkMzI1ZQ000 HTTP Error response = Bad Request API Error Message = Required teaser field not found.\n', referer: https://illinoisnewsroom.org/wp-admin/edit.php

I'm pretty sure that that error would be displayed in the post editor to the user.

@benlk
Copy link
Contributor Author

benlk commented Oct 4, 2018

Reply received:

As far as I know we've been populating all the needed custom fields. Is there documentation I can cross check and make sure that I'm not missing a field or two. Since no NPR fields are auto added under the custom fields of a new post I've been trying to add all that are applicable but it could definitely be that I'm missing one or two.

If the teaser field that needs to be filled out is just the except field then on post 2294 that info was provided. If there is a character limit on it though that could have been the issue with that.

@eteare
Copy link
Contributor

eteare commented Oct 4, 2018

Thanks Ben. I am going to take it from here with Alex to make sure he is using all the required fields.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants