Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Problem in rule "multiple" - IA #350

Open
RubenBautistaEF opened this issue Jun 7, 2019 · 3 comments
Open

Problem in rule "multiple" - IA #350

RubenBautistaEF opened this issue Jun 7, 2019 · 3 comments
Labels

Comments

@RubenBautistaEF
Copy link

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.

  • rule used*

    {
    "class": "InteractiveRule",
    "selector": "div.rich__block",
    "properties" : {
    "interactive.iframe" : {
    "type" : "multiple",
    "children": [
    {
    "type": "element",
    "selector": "blockquote"
    }, {
    "type": "next-sibling-element-of",
    "selector": "blockquote"
    }
    ]
    }
    }
    }

When a note contains a tweet the aforementioned rule works perfectly

Respecto al incidente en el KM 16.5 de la ZH del Mpio de B. Juárez hay 3 personas lesionadas no de gravedad una que perdió la vida. Las victimas son taxistas y presuntos narcomenudistas según testigos e indicios encontrados en el lugar de los hechos. No hay afectación a turistas.

— Alberto Capella (@kpya) 11 de diciembre de 2018
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

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

@pestevez pestevez added the bug label Jun 10, 2019
infinitely-young added a commit to infinitely-young/facebook-instant-articles-sdk-php that referenced this issue Jul 16, 2019
@muinh
Copy link

muinh commented Jul 16, 2019

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

@everton-rosario
Copy link
Contributor

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

@dsmikeyorke
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants