Closed (fixed)
Project:
Facebook Instant Articles
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
21 Apr 2017 at 01:39 UTC
Updated:
13 Jul 2017 at 17:24 UTC
Jump to comment: Most recent
Comments
Comment #2
m4oliveiComment #3
m4oliveiComment #4
m4oliveiHum core triggers are dead in D8 (https://www.drupal.org/node/764558), and one of my goals was to not ship the module with a requirement on rules to make use of the API approach. Rules is heavy and by default the D7 module didn't use it for much more than to ship a default rule configuration.
We could still ship a usable action that would let someone use Rules module themselves, but I'd rather see an out of the box solution, like simply implementing hook_entity_save with an alter to allow developers to insert their own business logic around which nodes go to instant articles.
This got me thinking that it might also fit to move to a model of the base model having everything necessary to programatically support the RSS and API approach, and then having super light sub-modules for views and api. The _views sub-module would just be the filter and default view config. The api would just be a hook_entity_save, hook_entity_delete, and alter hook to insert business logic. Leaving it super easy for developers to just turn on the base module and go with their own solution if they want (eg. importing via drush or using a queue), or turn on a default super simple and lightweight out of the box integration for either RSS or API.
Comment #5
m4oliveiUpdated title and description. Moving to use hook_entity_(save|delete) to do FB API actions in the _api sub-module. If there is interest in rules support, we can implement an action in the base module or a separate _actions submodule. I'd review patches for that, but I don't have any requests from a client for that admin flexibility at this point.
Comment #6
m4oliveiWIP: https://github.com/BurdaMagazinOrg/module-fb_instant_articles/pull/102
Functionally complete. Needs tests.
Comment #7
m4oliveiTests added, ready for review.
Comment #10
m4oliveiReviewed and approved by @sunset_bill.
Comment #11
m4olivei