Oembed plugin mkdir(): Permission denied error

Hello,

installed the oembed plugin with the kirby cli:

kirby plugin:install distantnative/oembed

embed a vimeo video with the new kirbytext tag :
(oembed: https://vimeo.com/43444347)

error message:

Warning: mkdir(): Permission denied in /....../site/plugins/oembed/lib/cache.php on line 12

getKirby Version
2.3.1

plugins
feed
field-selector
markdown(Editor)

Php Version
5.5

What Did I Do Wrong?

It’s a permissions problem. Check the write rights of your site/cache folder.

thanks texnixe the permissions problem ist solved,
but the embed video does not appear.

New Error Message

Kein Medium gefunden für https://vimeo.com/175813713

On my local test server it works fine but not on the live server
what can be the problem?

greeting perry

That’s probably rather a server problem, then. Nevertheless, could you test if it works with Kirby’s own vimeo tag?

yes the own vimeo tag worked.

(vimeo: http://vimeo.com/3432886 caption: This is a really nice video)

what is the difference between the plugin and the kirby’s own tag?

The plugin can receive a lot of different poviders.
The vimeo tag is only for vimeo videos.

Does the vimeo tag also work with the same url as above (https://vimeo.com/175813713)?

Can you see any difference in the way the oembed and the vimeo tags are rendered as html?

This is the tags rendered as html
local server

kirby’s own

<figure class="video"><iframe src="//player.vimeo.com/video/63244648" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="true"></iframe></figure>

oembed

<div class="kirby-plugin-oembed kirby-plugin-oembed--video kirby-plugin-oembed--Vimeo " style="padding-top:56.25%"><iframe data-src="https://player.vimeo.com/video/63244648?autoplay=1" width="640" height="360" frameborder="0" title="Fuga Vacui _ Trailer" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe><div class="kirby-plugin-oembed__thumb" style="background-image:url('http://tropchertoshare.lokal/thumbs/_plugins/oembed/06328c1f9ed6b1a13c6ae6873ed40dd0.');" title="Fuga Vacui _ Trailer (by Joel Inzunza & Compañia)"><img src="http://tropchertoshare.lokal/assets/plugins/oembed/images/play.png" alt="" width="175" height="110" /></div>

live server

kirby’s own

<figure class="video"><iframe src="//player.vimeo.com/video/63244648" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="true"></iframe></figure>

oembed

<div class="kirby-plugin-oembed kirby-plugin-oembed--error">Kein Medium gefunden für <span>https://vimeo.com/63244648</span></div>	</div>

Just looking at it quickly, it seems like an issue with getting the iframe with https on your server.

That’s what I thought as well, https might be an issue here. The kirby tag uses //, thus leaving the choice of protocol to the server.

Hi Perry, did you find out what was causing the issue?

hello texnixe

no I can’t test it with https protocol
only http.

No, I meant does oembed work with non-https video links? Or just not at all?

No dosen’t work.

<div class="kirby-plugin-oembed kirby-plugin-oembed--error">Kein Medium gefunden für <span>http://www.youtube.com/watch?v=jJDDSFuIj_w&feature=youtu.be</span></div>

Hm, I don’t have a solution. Could you create an issue on GitHub in the oembed repo? Maybe @distantnative can help with this.

It’s very likely that the reason is your hosting provider. Some providers block/disable HTTP requests to external servers for “security reasons”. oEmbed requires a request to get the embed URL.

Okay thank you for your help

https://github.com/distantnative/oembed/issues/58

Have you checked what I wrote above?

@lukasbestle: Why does the vimeo tag work while oembed doesn’t, if that was the case?

The Vimeo Kirbytag has a hardcoded reference to the player URL while oEmbed works by querying an API of the media provider. Because of this, the oEmbed plugin works with any media provider that supports the standard. But of course it doesn’t work if Kirby can’t make HTTP requests to the APIs of the media providers.