According to the docs for node_load_multiple (https://api.drupal.org/api/drupal/modules%21node%21node.module/function/...), the $conditions parameter has been deprecated, and it is recommended to instead "use EntityFieldQuery to retrieve a list of entity IDs".

A side effect of the current implementation is that sites with a large number of nodes loaded in the rss feed will result in either a PHP out of memory error or a max execution time error. Using EntityFieldQuery will allow developers to limit which nodes appear by either range or field properties.

Comments

rromore created an issue. See original summary.

rromore’s picture

rromore’s picture

I added a limit of 50 nodes in this patch. This number was chosen because Facebook needs a minimum of 50 articles to review it. I think this can be changed to a configurable number though.

sokrplare’s picture

Status: Active » Reviewed & tested by the community

Tried this out on my site which was throwing a 500 with max memory error - this solved it!

sokrplare’s picture

@vgardner - I know rromore has another patch coming that adds the ability to enable FBIA per node (not just per content type) which is a must-have for us. That will eclipse this patch actually too he said.

Re:

I have a list of features I'm still yet to implement (mostly related to covering all the fields and attributes in the Facebook Instant Articles spec).

I was wondering if you would be game to put up stub issues for that and then we can help do some of the work if you'd like? We've got a few folks here that would be up for putting some patches out for them if you can give some initial guidance in the issue!

vgardner’s picture

@sokrplare that would be great! I will create issues with items I consider a priority right now and would appreciate anyone picking them up. I'd also appreciate any suggestions or feedback you guys might have on the module, as I've been getting feedback from the Facebook Instant Articles team as well. Patches look good, I'll aim to test and apply them tomorrow.

sillygwailo’s picture

Version: » 7.x-1.x-dev
StatusFileSize
new1008 bytes

Re-rolling the patch, but with the up-to-date filename, and adding a reverse-chronological sort.

sillygwailo’s picture

Status: Reviewed & tested by the community » Needs review
sokrplare’s picture

@sillygwailo - nice re-roll! This issue might be superseded by #2685139: Implement FBIA configuration on a per-node basis. if you want to hop on that one!

vgardner’s picture

Status: Needs review » Closed (fixed)

Thanks for your contributions @rromore, @sokrplare and @sillygwailo.

Closing this issue as @sokrplare mentioned, this has been fixed in - https://www.drupal.org/node/2685139

vgardner’s picture

Status: Closed (fixed) » Fixed
m4olivei’s picture

Status: Fixed » Closed (fixed)

Running through and closing issues that are marked Fixed.