Error in "text_caption" field

hello,
I’m doing some maintenance of the CMS panel for a website, an artist portfolio, I downloaded the new version of Kirby and I think some plugins are deprecated or not compatible anymore – im now having the following problem:

For example in some fields of the panel im seeing the following error:

Invalid field type ("markdown”)

Invalid value for “font” in file: /Applications/MAMP/htdocs/www/kirby/src/Toolkit/Component.php line: 165

I installed markdown with composer, am i missing something else? Should I check in the blueprint files?

Thank you for your attention on the matter, I hope i gave you enough details, and that i manage to explain my self, looking forward to your prompt response and resolution of the issue. Please let me know if you need more details.

best
Alex

Hi, no idea where the font error comes from, seems to be some custom code involved. Please post the blueprint for the page.

As regards the markdown plugin, check your composer file which version you require and if that is the latest version. You can also check in the system view what is currently installed.

Also make sure you deleted the media folder after updating.

hello,
thank you so much for your prompt response i’m so grateful for your help.

  1. here are the blueprint codes where the propriety font is being listed:

/blueprints/files/default.yml :

title: Image

create: 
  width: 500 
  height: 500
  crop: true

accept: true 

fields:
  caption:
    label: File caption
    type: textarea  
    font:
      family: sans-serif
      scaling: true
      size: regular
    buttons:
      - italic
      - link
      - email
    blank: true
    invisibles: true
    size: small
    width: 1/2  

blueprints/pages/setting_seo.yml:

title: SEO

icon: cog

options:
  status: false
  delete: false
  title: false
  template: false
  url: false
  preview: false

columns:
  - width: 3/4
    sections:
      seo_fields:
        type: fields
        fields:
          seo_headline:
            label: Global SEO-related metatags
            numbered: true
            type: headline
            numbered: false
          website_title:
            label: Website title
            type: text
            width: 1/3
          website_description:
            label: Website description
            type: markdown
            font:
              family: sans-serif
              scaling: false
              size: regular
            buttons: false
            maxlength: 155
            help: Description should be max. 155 characters long (for google referencing).
            width: 1/3
          keywords:
            label: Keywords
            type: markdown
            font:
              family: sans-serif
              scaling: false
              size: regular
            buttons: false
            help: Keyworks should each be separated by a comma.
            width: 1/3
          socmed_image:
            label: Social media images (max. 3)
            type: files 
            layout: cards
            max: 3
            width: 1/1
  - width: 1/4
    sections:
      files:
        headline: Upload images here
        type: files

blueprints/pages/project.yml

title: Project

icon: folder

columns:
  - width: 3/4
    sections:
      content:
        type: fields
        fields:
          homepage_image:
            label: Homepage image
            type: files
            layout: cards
            size: small
            query: page.images
            translate: false
            image:
              cover: false
              ratio: 3/2
              back: white
            multiple: false
            width: 1/3
          text_caption:
            label: Project caption
            type: markdown
            size: medium
            font:
              family: sans-serif
              scaling: true
              size: regular
            buttons:
              - italic
              - link
              - email
            blank: true
            invisibles: true
            maxlength: 200
            help: Max. 200 characters
            counter: true
            size: small
            width: 2/3
          images_content:
            label: Image slider
            type: files
            layout: cards
            size: small
            query: page.images
            translate: false
            image:
              cover: false
              ratio: 3/2
              back: white
            multiple: true
            width: 1/1
  - width: 1/4
    sections:
      files:
        headline: Upload file(s)
        type: files
      seo:
        type: fields
        fields:
          head_seo:
            type: headline
            label: SEO
            numbered: false
          text_seo:
            label: Page description for SEO
            type: markdown
            font:
              family: sans-serif
              scaling: false
              size: regular
            buttons: false
          socmed_image:
            label: Social media image
            type: files 
            layout: cards
            query: page.images
            #help: "The image needs to be uploaded through the 'upload file(s)' element before it can be added here."
            max: 1
            width: 1/1

blueprints/pages/about.yml

title: About
icon: box

options:
  status: false 
  delete: false
  template: false
  pages: false
  duplicate: false
  url: false
  changeTitle: false
  changeStatus: false

columns:
  - width: 3/4
    sections:
      content:
        type: fields
        fields:
          description:
            label: Head info
            type: markdown
            size: medium
            placeholder: Short description
            font:
              family: sans-serif
              scaling: true
              size: small
            buttons:
              - italic
              - link
              - email
            blank: true
            invisibles: true
          education_title:
            label: Education (section title)
            type: text
            placeholder: Education title
            font:
              family: sans-serif
              scaling: true
              size: regular
            blank: true
            invisibles: true
          education_lines:
            label: Education (entries)
            type: structure
            fields:
              years:
                label: Year(s)
                type: text
                width: 1/6
              title:
                label: Description
                type: text
                width: 5/6
          exhibitions_title:
            label: Exhibitions (section title)
            type: text
            placeholder: Exibition title
            font:
              family: sans-serif
              scaling: true
              size: regular
            blank: true
            invisibles: true
          exhibitions_lines:
            label: Exhibitions (entries)
            type: structure
            fields:
              years:
                label: Year(s)
                type: text
                width: 1/6
              type:
                label: Type
                type: text
                width: 2/6
              title:
                label: Title
                type: text
                width: 3/6
              place:
                label: Place
                type: text
                width: 3/6
              location:
                label: Location
                type: text
                width: 3/6
          commissioned_title:
            label: Commissioned work (section title)
            type: text
            placeholder: Commissioned work title
            font:
              family: sans-serif
              scaling: true
              size: regular
            blank: true
            invisibles: true
          commissioned_lines:
            label: Commissioned work (entries)
            type: structure
            fields:
              years:
                label: Year(s)
                type: text
                width: 1/6
              title:
                label: Description
                type: text
                width: 5/6
          teaching_title:
            label: Teaching (section title)
            type: text
            placeholder: Teaching title
            font:
              family: sans-serif
              scaling: true
              size: regular
            blank: true
            invisibles: true
          teaching_lines:
            label: Teaching (entries)
            type: structure
            fields:
              years:
                label: Year(s)
                type: text
                width: 1/6
              title:
                label: Description
                type: text
                width: 5/6
  - width: 1/4
    sticky: true
    sections:
      files:
        headline: Upload file(s)
        type: files
      seo:
        type: fields
        fields:
          head_seo:
            type: headline
            label: SEO
            numbered: false
          text_seo:
            label: Page description for SEO
            type: markdown
            font:
              family: sans-serif
              scaling: false
              size: regular
            buttons: false
          socmed_image:
            label: Social media image
            type: files 
            layout: cards
            query: page.images
            #help: "The image needs to be uploaded through the 'upload file(s)' element before it can be added here."
            max: 1
            width: 1/1
  1. I checked in the composer.json file in the directory of the website, in the list of dependencies of the section require the plugin is listed as “fabianmichael/kirby-markdown-field” with version 2.2 – so i guess i do not have the latest version, i checked on fabianmichael/kirby-markdown-field - Packagist and there seems to be many more newest versions – i updated to version 3.0.0-alpha. 2 – I checked the composer file and the system view and everything seems to be matching now. But the problem persists.

  2. I deleted the the media folder after updating the plugin, but still having the error, i guess is a problem in the code as you mentioned, maybe the font propriety is not a standard one for the markdown? I don’t know.

I don’t know what to do, looking forward to hear back with some precious help
hope the information i sent are helpful.
best
Alex

Hm, according to the docs, the font property expects a string value, so

font: sans # or monospace

And I can’t see blank or invisibles documented for a textarea field. Guess this should also be a markdown field?

Regarding the markdown field, better consult the documentation for the allowed properties.

After updating the plugin, have you checked in Panel system view if you have the latest version? Don’t think updating to an alpha makes sense. So 2.2.0 seems to be the latest stable version

1 Like

omg thanks a lot i replaced

font:
  family: sans-serif
  scaling: true
  size: small

to

    font: sans

in every blueprint file and is working, im not getting the mistake anymore,
amazing so so happy thank you so much!

best
Alex