Comments (6)
Also reported on the WordPress forums:
https://wordpress.org/support/topic/articles-that-begin-with-an-image-are-stripping-out-first-paragraph?replies=2
https://wordpress.org/support/topic/content-within-div-missing-in-instant-article-and-other-content-missing?replies=2
from facebook-instant-articles-sdk-php.
@katazina Can you help us validating this PR that fixes your issue?
from facebook-instant-articles-sdk-php.
unfortunately it's not working for me.
I downloaded a patch file, after that I downloaded the whole paragraph-with-image branch, but no success.
Try with the attached post content.
paragraph-image.txt
from facebook-instant-articles-sdk-php.
@katazina did you configure the new rule on your ruleset JSON? If so, can you share how your JSON looks like?
from facebook-instant-articles-sdk-php.
Sorry, it's night here. I refreshed the json file, but now I got an error when the feed is generated:
PHP Fatal error: Call to undefined method Facebook\InstantArticles\Elements\InstantArticle::appendText() in facebook-instant-articles-sdk-php/src/Facebook/InstantArticles/Transformer/Rules/TextNodeRule.php on line 48
I'm trying to figure it out what happened.
from facebook-instant-articles-sdk-php.
I'm sorry, I had no time to check it.
Now I did.
It's half good, but still not perfect.
Here is a code which on the transformer fails:
<p><img class="alignleft size-medium wp-image-5545280" src="https://pixabay.com/static/uploads/photo/2015/10/01/20/15/landscape-967630_960_720.jpg" alt="something" width="320" height="213" />almafa fsdfsdff8</p>
<p>sfsdfsd</p>
<p>3333sdfsdfsd</p>
<ul>
<li>some text <a href="https://pixabay.com/static/uploads/photo/2015/10/01/20/15/landscape-967630_960_720.jpg"><img src="https://pixabay.com/static/uploads/photo/2015/10/01/20/15/landscape-967630_960_720.jpg" width="600" height="360" /></a></li>
</ul>
<p>sfdsfsdf</p>
<p>sfsdfsd</p>
<p>fssd</p>
And here is the current result:
<figure>
<img src="https://pixabay.com/static/uploads/photo/2015/10/01/20/15/landscape-967630_960_720.jpg"/>
</figure>
<p>almafa fsdfsdff8</p>
<p>sfsdfsd</p>
<p>3333sdfsdfsd</p>
<ul>
<li>some text <a href="https://pixabay.com/static/uploads/photo/2015/10/01/20/15/landscape-967630_960_720.jpg"></a></li>
</ul>
<p>sfdsfsdf</p>
<p>sfsdfsd</p>
<p>fssd</p>
You can see, beside the some text the image is not processed, but an empty a tag was kept.
With the p tag in the first line, it worked perfectly.
from facebook-instant-articles-sdk-php.
Related Issues (20)
- Failed Connection with graph.facebook.com HOT 2
- Handling of Ads Settings fields
- Support paragraphs inside Blockquote
- FAN on AMP? HOT 2
- Validate Analytics Configuration
- Installation problem on laravel 5.6 HOT 1
- RTL problem HOT 2
- Unable to use ConstantGetter with InteractiveRule HOT 4
- autoplay video in fullscreen HOT 1
- Transformer's transform method does not account for settings
- Problem in rule "multiple" - IA HOT 3
- Query params in related articles
- [BUG] : Problem with the Span and Anchor Rule
- Travis CI Php 5.5 and Php 5.4
- Fetch
- Integration in Symfony 5 is not possible because of css selector version in composer.json HOT 1
- FBInterstitialAd is gives all time "server error"
- support php 8 HOT 2
- Use InstantArticleInterface instead of InstantArticle as parameter type for Transformer methods
- How to create a scheduled facebook instant article through PHP SDK
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebook-instant-articles-sdk-php.