willpublicmedia / npr-api-expressionengine

Access the NPR API from within ExpressionEngine.
1 stars 1 forks source link

Fix remote delete #31

Closed areynold closed 3 years ago

areynold commented 3 years ago

In GitLab by @areynold on Oct 4, 2019, 15:02

ExpressionEngine deletes data from custom ChannelEntry fields before the before_channel_entry_delete hook runs. All the story data we use to determine whether to push a delete to npr's story api is contained in custom fields, so cannot be used.

Consider creating a pushed_story table on installation and adding a row with entry_id, npr_story_id on push. On delete, retrieve npr_story_id from pushed_story by entry_id. If a story id is found, push a delete to npr.

areynold commented 3 years ago

In GitLab by @areynold on Oct 7, 2019, 10:30

closed