mikahanninen / grav-plugin-facebook

Facebook plugin for Grav CMS https://github.com/getgrav/grav
MIT License
16 stars 12 forks source link

Function facebook_posts in page #33

Closed snzhuravlev closed 7 years ago

snzhuravlev commented 7 years ago

I novice in Grav. I install Facebook plugin, next insert function in page (default) - {{ facebook_posts() }}, get "raw" html text in browser. " \

mikahanninen commented 7 years ago

have you enabled twig processing in the settings ?

snzhuravlev commented 7 years ago

yes after add " |raw " begin better, but leave html artefacts " .. br />
... \

\\
" http://test.slava-yoga.com.ua/ru

function {{ facebook_events()|raw }} - work http://test.slava-yoga.com.ua/ru

function {{ facebook_album() }} - not http://test.slava-yoga.com.ua/ru/foto

mikahanninen commented 7 years ago

I can't check this until next week - I am without computer until Monday

snzhuravlev commented 7 years ago

When the gantry plug-in is turned on, the Facebook plug-in does not work :(

loopion commented 7 years ago

I have exactly the same issue. Pretty frustrating when you see all the content in HTML but not interpreted.

loopion commented 7 years ago

@snzhuravlev I see that on your website you've succeed to resolve the issue. How have you resolved it for your events please?

snzhuravlev commented 7 years ago

@loopion I remove Gantry template and plugin

mikahanninen commented 7 years ago

I don't have knowledge about using this plugin with Gantry (no Gantry knowledge). Maybe ask this from maker of Gantry plugin ?

mahagr commented 7 years ago

@mikahanninen You need to use |raw filter for any output with HTML in it. Grav does not use auto-escaping by default, but Gantry forces it to turn on for improved security. This is something that will likely be forced in Grav 2.0 as well.

mikahanninen commented 7 years ago

Okay I will debug this issue with auto-escaping on.

loopion commented 7 years ago

Once I've added the |raw it correctly displayed the feeds except for the <figure><img class="media-object" src="https://scontent.xx.fbcdn.net/v/t1.0-9/s720x720/21462819_1425869327448619_1429021317145976386_n.jpg?oh=08b7749481d34b678753d762f482571c&oe=5A5B012D"></figure>

Is there a way to have this part too correctly interpreted?

Thanks @mahagr and @mikahanninen for your quick replies.

mikahanninen commented 7 years ago

@loopion do you have page that I view ? or can you share the page contents ?

loopion commented 7 years ago

Just sent you an email with it.

The album works perfectly fine, so thank you for this great plugin!

mikahanninen commented 7 years ago

Please tell me if release 1.6.2 fixes your problems ? I tested all functions with |raw filter and they worked.

{{ facebook_album()|raw }} {{ facebook_posts()|raw }} {{ facebook_events()|raw }}

loopion commented 7 years ago

Everything works now like a charm! Thanks a lot for this update and making it compatible with upcoming version of Grav.

Ticket can now be closed