Versioncheck for Plugins

Hi there,

i have a plugin / template, which is accessable via composer, but the versioncheck in the backend is not working.
update

Does the plugin have to be published to kirby for that?

greetings
Timo Haas

What is your Kirby version? What do you mean it is not working? What is this 3.8.8.1 version shown?

Hi,

my kirby version is 3.8.4. The 3.8.8.1 is the version of the plugin on packagist and was installed via composer.
Now i wonder, why it doesnt recognize that 3.8.8.1 is the newest version.

greetings

Which plugin is it?

Here’s a list of all kirby plugins published to packagist with their versions. I can’t find any 3.8.8.1 :confused:

Thanks, pretty cool tool though!
The plugin is available via composer: khepri-design/khepri-base - Packagist
Do i have to define anywhere that this is for kirby or smth like that? I don’t want to publish it via Plugins | Kirby CMS yet, but want my customers to update via the panel.

I hope i explained it well, its the first time, i “publish” a plugin.

Kirby gets the version number either from the composer.json file or from vendor/composer/installed.php:

// if plugin doesn’t have version key in composer.json file
// try to get version from “vendor/composer/installed.php”

Yes, Kirby plugins need to have a "type": "kirby-plugin" property in their composer.json file. I think this is for the custom composer installer (you also need to require) so that the plugin gets installed into site/plugins/ and not into vendor/.

See an example here:

PS:

I don’t know if users can update via panel. AFAIK the panel only tells you if there is an update, it doesn’t give you an option to actually install it.

1 Like

Hi, thanks i missed the “type” somehow.

okey i didnt know that this is just an information, thanks for the advice :slight_smile:

In the »Basic Plugin Setup« article (link above), it says the version has to be included in composer.json in order for Kirby to check if the plugin is up to date.

However if I put the version number in my plugin, it still shows “Could not check for updates”. (Yes the plugin is live on GitHub and Packagist and installed via Composer. And yes, everywhere including Kirby Panel it says the version is 1.0.0)

And some other plugin I have installed, doesn’t have a version number in their composer.json, but in the panel it shows “Plugin is up to date”. :person_shrugging:

I would love to see a green checkmark for my plugins… but how can I tell Kirby that the plugin is up to date? Thanks for any ideas!

I think you need to have it listed on Plugins | Kirby CMS

the system queries an update status from a file hosted by getkirby.com
https://assets.getkirby.com/plugins.json

for a single plugin with package name (thats the one from the composer package)

example: https://assets.getkirby.com/plugins/bnomei/janitor.json

but like @rasteiner said it will only list packages it know of so you need to register them at getkirby.com via a PR to GitHub - getkirby/getkirby.com: Source code and content for the Kirby website