Difference of deploying via git and ftp / manually (also: invalid field type error)?

Hi everyone,

I’m developing on my local environment using MAMP Pro and everything works as expected. As soon as I deploy via git to a host for a quick test, images in the frontend don’t load (img src(unknown)). As I checked in the panel I’ve found in the files template page “Invalid field type (“imagecrop”)”.

I’m using this plugin: https://github.com/steirico/kirby-plugin-image-crop-field which this is related to. This is how my blueprint looks like:

    label: Beschreibung
    type: text
    label: Zuschneiden
    type: imagecrop
      width: 50
      height: 50
    preserveAspectRatio: true

So I’ve checked various things:

  • I’ve deleted the contents of the site/session folder, without luck.
  • content folder was set to 755, changed to 644, no luck either.
  • updated to the latest Kirby version (3.3.3), no luck.

Then I deleted everything on the host and uploaded / deployed via FTP, obviously without .git folder. And it worked!

Can anyone explain to me what I have missed? I’ve previously deployed via GitHub and it usually worked. This is the first time using a plugin I think, but that can’t be it?

How did you include the plugin? As a submodule?

Note that folder permissions must be 755, files 644!

I didn’t know there are multiple ways! I’ve just downloaded and unpacked it to the folder plugins, as described here.

Ok, and you commited it and it ended up on the server? And the permissions and ownership were all ok, because I often had the problem that I had to use a post commit hook to change ownership when deploying via git.

And yes, you can install plugins manually like you did, install them as git submodules or install via composer.

1 Like