Closed bmcnulty7 closed 3 weeks ago
I think I have one small editorial concern/clarification about this suggested approach.
Currently, if a post is deleted directly from iCloud News Publisher, an editor can still see an error message as to why the post was not updated in Apple News (the error message is cryptic but that's a separate issue).
By doing what the AC is asking, resetting the post data, the same post would be added to Apple News again, the next time it was updated. Which I'd expect to be not the original goal of the editor, since it was probably deleted from Apple News for a specific purpose.
The editorial intent here might be important. Did the editor choose to delete it from Apple News? Do they not want to readd this article to Apple News?
Aside: I do see an option "Hidden Article" to hide it in Apple News, but I don't see an option (except via code), to purposefully not to index a specific post.
cc: @bmcnulty7, @kevinfodness
Another editorial pespective here is that, if an editor deleted the article in Apple News by mistake, and then they update the post. The article won't sync to Apple News because the data is out of sync (deleted in Apple News but present in the article post meta).
Which in theory, an editor wants the article to be sent to Apple News, they just can't currently force it (see #1008). And the update sort of goes into a loop (due to out of sync data).
In my experience, there's more frustration over being in the "stuck state" where they want to push an article to Apple News but can't because the ID is out of sync. If the site is set to auto-publish articles to Apple News, there would be an expectation that hitting "Publish" means that an article goes to Apple News. If they don't want that, they need to either a) turn off autopublish or b) set up rules to make articles that match certain term IDs (for example) not publish. Term ID exclusions are available on the settings screen. By keeping the data in sync here, it matches the experience of converting an article to a draft (which deletes it from Apple News) then republishing it (which causes it to be pushed to Apple News again).
Removing myself since I'll be leaving for PTO/vacation. But the pr is good and it is pending further testing on a live/testing site. 🎈
@kevinfodness Not sure if you agree, but I opted to show a message instead of an error message or silently reindexing. Let me know if you have any objections.
Description
I would like to see support for removing the Apple News article metadata in WP if it tries to get info on the articles from the News API and the News API reports that the article doesn't exist, so that error messages are no longer thrown for this scenario.
Use Case
When a post is deleted directly in iCloud News Publisher, the postmeta should be updated in WP if the News API reports a 404 so the request to fetch the article doesn't continue.
Acceptance Criteria