facebookarchive / facebook-instant-articles-sdk-php

The Facebook Instant Articles SDK for PHP provides a native interface for creating and publishing Instant Articles.
https://instantarticles.fb.com/
Other
232 stars 148 forks source link

Problem in rule "multiple" - IA #350

Open RubenBautistaEF opened 5 years ago

RubenBautistaEF commented 5 years ago

hello everyone

Expected Result

Within the rules that make up an instant article, a rule of multiple type was defined, so that when a note contains a tweet, the blockquote and its corresponding script are painted, which contains the Twitter library that allows its correct visualization in Instant Articles.

When a note contains a tweet the aforementioned rule works perfectly

# Actual Result The problem arises when the notes do not contain a tweet, send these errors. { "Error500": true, "Msg": "Call to a member function cloneNode() on null", "Code": 0, "RequestType": 1, "Request": { "attributes": {}, "request": {}, "query": {}, "server": {}, "files": {}, "cookies": {}, "headers": {} } } * php.CRITICAL: Fatal Error: Call to a member function cloneNode() on null {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 0): Error: Call to a member function cloneNode() on null at /var/www/apis/vendor/facebook/facebook-instant-articles-sdk-php/src/Facebook/InstantArticles/Transformer/Transformer.php:105)"} [] This version is used "facebook-instant-articles-sdk-php - v1.10.1" Thanks
muinh commented 5 years ago

@pestevez @infinitely-young added a good solution. Check it please ASAP

everton-rosario commented 5 years ago

@infinitely-young or @muinh , would you send the PR with the referred fix?

dsmikeyorke commented 4 years ago

Has there been any progress on this? We are experiencing the same fatal error.