Currently, if you have the Publish to Apple News checkbox checked, the API call is made on Save, regardless of things like published status, or other things that users of the module may care about.

I think it's OK to leave that behaviour as is, although it would be good to provide an alter to allow others to insert their own business logic to affect when the API call to Apple News happens, and whether or not it's in Draft mode. For instance, we'd like to make the push to Apple News respect the published status of the node and only push to Apple News as live when the node is published. We'd also like to decouple the API call from the node form Save (and say offload it to a queue), so that it doesn't add to the time it takes to save a node, which in our case, is already significant.

This feature request is to add an alter hook on node save to allow modules to affect when the API call to Apple News happens, and in general to alter the Apple News settings on the node form according to business rules.

Comments

m4olivei created an issue. See original summary.

  • m4olivei committed 4e0cf1c on 7.x-2.x
    Issue #2851566 split the alter into two, one pre_save and one pre push.
    
  • m4olivei committed 65e91ea on 7.x-2.x
    Issue #2851566 some refactoring to clean things up a bit and be less...
  • m4olivei committed 83d605d on 7.x-2.x
    Issue #2851566 add  to the alter before using entity specific Apple News...
  • m4olivei committed 942f2d0 on 7.x-2.x
    Issue #2851566 document the new hooks and add  param to the...
  • m4olivei committed fdde9dd on 7.x-2.x
    Issue #2851566 add an alter for the per-entity Apple News settings.
    
m4olivei’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.