The field type "xxx" does not exist

Hi Kirby - Family!

Installing the following Plugins as git Submodules i get the Message:
«The field type “xxx” does not exist».

  • kirby-color
  • kirby-color-palette
  • kirby-colorextractor
  • laravel-mix-kirby

Removing the Submodules and Re-installing them manually
I still get the same error. Maybe it has something to do with the cache?

Installing the Plugins manually from the start on a fresh
kirby starterkit works perfectly and i don’t get the error messages.

Thanx for your help!

Saludos,

Funkybrotha

Have you cleared the session data and the browser cache? Then logged in again?

Hi texnixe!

Yep, now I cleared the session data and browser cache in chrome:
-> Inspect
-> Application
-> Clear storage -> clear site data
-> cleared Local storage and Session storage

After login-in again I get the same error message.

As soon as I hit the panel tab with the expected field
i get the error message and in the background a new folder is created in:
public/site/cache/kirby-starterkit.test/sylvainjule/color-palette/
The color-palette folder is empty.

Texnixe, thanx a lot for your support!

That’s at least a good sign. What does your blueprint with the field look like?

Installing the plugins manually everything works.
Adding them as git submodules seems to cause the problem.
What should be shown in the cache plugin folder?

in tabs/style.yml

# Style
label: Style
icon: text
fields:
  colorsHeadline:
    label: Colors
    type: headline
    numbered: false
  fgColor:
    width: 1/2
    label: Foreground color
    type: color-palette
    options: query
    query:
      fetch: site.colors.toStructure
      value: "{{ structureItem.color }}"
  bgColor:
    width: 1/2
    label: Background color
    type: color-palette
    options: query
    query:
      fetch: site.colors.toStructure
      value: "{{ structureItem.color }}"
  text-align: fields/text-alignment

in site.yml

  # Style
  style:
    label: Style
    icon: text
    fields:
      colorsHeadline:
        label: Colors
        type: headline
        numbered: false
      colors:
        label: Theme colors
        type: structure
        fields:
          color:
            type: color
            editableAlpha: false
      footerStyle:
        label: Footer
        type: headline
        numbered: false
      styleHrToggle:
        label: Display horizontal rules?
        type: toggle
        text:
            - Nope
            - Yay

Thanx!

Sure you are installing to the correct folder if you install them as git submodules?

…I think so…

[submodule "public/kirby"]

path = public/kirby

url = https://github.com/getkirby/kirby.git

[submodule "public/site/plugins/laravel-mix-kirby"]

path = public/site/plugins/laravel-mix-kirby

url = https://github.com/Diverently/laravel-mix-kirby.git

[submodule "public/site/plugins/kirby-color"]

path = public/site/plugins/kirby-color

url = https://github.com/TimOetting/kirby-color.git

[submodule "public/site/plugins/kirby-color-palette"]

path = public/site/plugins/kirby-color-palette

url = https://github.com/sylvainjule/kirby-color-palette.git

[submodule "public/site/plugins/kirby-colorextractor"]

path = public/site/plugins/kirby-colorextractor

url = https://github.com/sylvainjule/kirby-colorextractor.git

url = https://github.com/getkirby/kirby.git

strange thing is… the laravel-mix-kirby plugin works…
but then again… has nothing to do with panel fields.

Hm, hard to tell from here. Does none of the field type plugins work if you install them separately (not all of them together)?

Yep, they work but just installing them manually on a fresh Kirby install.
Are the installed Plugins registered by Kirby in some way?

Maybe @sylvainjule knows something about this behaviour?
kirby-color-palette and kirby-colorextractor are written by him.

kirby-color by @timoetting and laravel-mix-kirby @RobertC
seem to work just fine now.

I only tried installing the Color-palette plugin as Git submodule and didn’t run into any issues.

dump(array_keys($kirby->plugins()));

gives you a list of all installed Kirby plugins

Now I also installed the color extractor, and the field shows up as expected (only extracting color itself throws errors).

Seems like you have installed the original repo of kirby-color, whose index.js is the dev version and expects hmr and stuff, which will throw errors and could lead to JS issues with other fields. This fork might be something to try.

Hi @sylvainjule

YESSS! Thanx a lot! Now it works with your fork.
Do I have to report something to @timoetting?

Thanx @sylvainjule and @texnixe great support as always!

You’re welcome! There are issues about this and I made a pull request, so nothing further to report I guess, Tim probably doesn’t have time to go through it right now.

2 Likes

Hey. I just merged the pull request. Thanks @sylvainjule for your contribution :v:

1 Like

hi @sylvainjule
hi @timoetting

Thanx a lot for your work!
The following Plugins now play nicely together as git submodules.

  • kirby-color
  • kirby-color-palette
  • kirby-colorextractor
  • laravel-mix-kirby

Saludos,

Funkybrotha

3 Likes

For future reference:

This also happens when using PHP’s built-in server without pointing to router. It will trigger: Field type “xxx” does not exist. on all custom fields.

# triggers error
php -S localhost:8000
# works normally
php -S localhost:8000 kirby/router.php

Kirby docs specifically recommends avoiding PHP’s built-in server. Try listed alternatives.

4 Likes

re-opening this as i’m encountering the same problem, but only when i move my local kirby setup (running on valet) to the server (running apache+ nginx).

i’m using kirby builder and i get the following error rather than the plugin being rendered on the page:

The field type "builder" does not exist 

i tried to:

  • clear cache folder
  • delete media folder
  • clear session folder
  • move kirby-builder plugin folder out and in from plugin folder
  • delete vendor folder and do composer install

none fixed it yet. any idea?

Are you using any other Panel plugins? If yes, do they work as expected? Are the plugin assets copied/symlinked to the media folder?

Only using kirby-builder for now.

These are in /<website>/media/panel/<hash>/

  • app.js
  • plugins.js
  • vendor.js

If I check the browser console I see though

Loading failed for the <script> with source “https://<subdomain.website>/media/plugins/index.js?1570538774”.

Does the server support symlinking? Because while the files are called from the media folder, they do not really exist there but are symlinked.