Video plugin outputting at top of kt() textarea

“Call to a member function xy() on null” always means you don’t have an object.

I just made another test with freshly uploaded files.
There seems to be a problem with one particular video file.
Now two videos works fine next to other pictures.

So the plugin works fine. Sorry for that.
If I figure out what is wrong with that other video, I’ll let you know.

Thanks for answering. Glad it works now for you… i should still check the file exists more throughly though, I’ll push tweak up later.

I still have to get that T-Shirt…

Yup :slight_smile: A t-shirt that says “rSync Rulezzz” is on my xmas list…

:rofl:

Yep!

@jimbobrjames & @texnixe I might be wrong.
Could it be, that the refined plugin needs newly uploaded files?
I re-uploaded the problematic files and now they work fine.
Could it have to do with old files in the media folder?

If so, I would have to make sure to not just update the plugin on an existing page, but make a local copy, update the plugin and replace all videos.

Hmm i wouldnt have thought so. I didnt delete them when i made changes to the tag this evening.

In anycase, i literally just pushed version 0.0.7, which checks better for files. If you customised the snippet at all, just double check it against the plugin version since there are a couple of small changes to it (for the mime type and modified file stamp in the JSON Schema).

So, I did update the plugin to the latest version, and now all I get onto the front-end is the naked markdown. (I did not modify the snippet)
(vidembed: video.mp4 poster: poster.jpg)

Try taking the tags out of the text area, save the page, reload the page in the browser, and put the tags back. I think the panel might have got confused with an older copy of the tag. Usually when that happens, it means the tags throwing an error but they hard to see. I think the panel is running an older version of the tag from memory against the newer snippet.

I did so. But it remains the same.
I have to get offline now. Will have another look tomorrow evening.

Strange. It works totally fine for me with Kirby 3.3.0 and PHP 7.1.

Running Kirby 3.2.4 here and tried PhP 7.1.12 and 7.2.1

I was on 3.2.5 when i started fixing things yesterday, and upgraded to 3.30 just before i made version 0.0.7 of the plugin. Ive made new pages in my sandbox project and added multiple videos to them tottally fine. I guess there must be something peculiar to your particular project. Have you got any other tags / plugins / hooks installed?

On a side note: if you don’t have a file, you might as well return null right at the beginning, saves having to go through all the stuff for nothing and also checking for the file object multiple times.

Sure, I might refactor it one day. I made that plugin about 8 months ago and I’ve learnt a trick or two since… what i dont have is time :frowning: Oddly, @ewalthert is the first to point out issues with it in that time.

@jimbobrjames I’m sorry that I keep nagging …
I also use image tags. Deleted them for now and disabled all javascript on the page. No luck.

Hrmm… I’m knee deep in client work at the moment. I will have to take a look this evening.

Please take your time. I won’t be able to update the existing site before next week anyhow. (But let me know if you want me to run other tests in the meantime.)

Don’t know if you had that script bit in your snippet before or not, but for me the tag doesn’t render at all.