oEmbed from panel only locally?

When I try to embed a video into a textarea on my blog via Kirbytext tag it doesn’t work when I do that in the panel on the site that is online. Trying the same thing locally and then ftp-ing everything up works.

What am I doing wrong here?

What exactly “does not work”? After all, it’s just adding a URL to a form field… The page is not saved? The video is not displayed? Other?

The video isn’t displayed. Instead there is the message No medium found for URL https://youtu.be/xyz

I am not using the embed code, but the sharing code with the url, because I added a style to the class of the “kirby-plugin-oembed”. But even if I add the style to “iframe” I get the video with the style plus No medium found for URL

Oh and I use it in the textarea field.

Can you show me what your code looks like in the template and what you have in the content file for the incriminated field?

The template for the article page. Only content part is the kirbytext tag

     <article class="blog-text">
            <?= $page->text()->kirbytext() ?>
        </article>

In the content file:

Text: (oembed:https://youtu.be/TpK5qHQK1q4)

And the generated source code?

Any errors in the console apart from the error message in the page?

[quote=“texnixe, post:6, topic:7012”]
And the generated source code?[/quote]

No iframe. Just a span with the message “No medium found…”

No errors.

The error is traceable to the magic __toString method.

Don’t know if this is related, but have you checked if the thumbs and cache folders exist and are writable?

Yes, the folders exist and are writable.

M-m-magic__toString method? How do I …like… do that?

You haven’t done anything, I just had a look at the source code to check why or where the error is produced. The magic __toString() method is always called if an object is used in a string context, for example, if it is echoed.

But I’m afraid I’m at my wits’ end and will invite @distantnative to the topic. He’s traveling around Mexico at the mo, but since he was around a few days ago, maybe there is hope.

Ok, it is not urgent. Also, I maybe have a capital letter in the name of my main site folder for this. I think, in the meantime I could find out if I can change that… .

Thank you again, @texnixe and good Feierabend…?!

CAPITAL LETTER? Oh, oh. CAPITAL ERROR! :wink:

I will try to have a look at it by the end of this week!

Just tried it on a freshly installed starterkit with

(oembed:https://youtu.be/TpK5qHQK1q4)

And it works just fine for me. Could you check if it is working for you know? Maybe it was just a temporarily problem. No medium found for URL is the result the library, that the oembed plugin is based on, throws when it cannot load any embedable content from the URL.

Though in general, the Embed library seems to prefer the normal, non-short URLs, so maybe just try https://www.youtube.com/watch?v=TpK5qHQK1q4

Fair enough, but this would not really explain why it works locally but not remote? Or even more strangely, it works remotely if the files are created locally and then uploaded via FTP. I could not reproduce the problem either, but then I only tested locally.

I guess its somewhere in my permissions because there is a capital letter in the name of my site folder on the server. So the library (or something) loads locally, but not online. The server doesn’t like capital letters e.g. in images.

True :confused:
Guess it really must be something related to the environment

Changed everything to lowercase - no luck.

Next I am going to re-install the plugin and check if php versions are different. It should be php7 in both cases.

Could you also remove the piwik script that causes an error in console, just to make sure this does not interfere in any way.