Cannot create file links in text area

Hi there,

in my current project, I have a project sub-page with a few textarea fields. In these fields, I have the “files” button enabled to be able to create download links for files.

However, when I try to use this button in any of the files I get an error:

No route found for path: "files" and request method: "GET"

20220723-180802_Screenshot_friedrich.test

How can I fix this and allow to link uploaded files?

Thanks!

What are the exact steps needed to reproduce this? Please also post your blueprint definition for the field and indicate your Kirby version.

Clicking on the file link button of any textarea field.

text:
  label: Projekt-Text
  type: textarea
  size: medium

3.7.1

Ok, I just found out that this is caused by a self-written plugin.

I have a method that is supposed to turn off the counter on text fields and text area fields off by default:

Kirby::plugin('trych/field-defaults', [
  'fields' => [

    'text' => [
      'extends' => 'text',
      'props' => [
        'counter' => fn($value = false) => $value
      ]
    ],

    'textarea' => [
      'extends' => 'text',
      'props' => [
        'buttons' => fn($value = ['headlines', 'italic', '|', 'link', 'email', 'file', '|', 'ul', 'ol']) => $value,
        'counter' => fn($value = false) => $value
      ]
    ],

  ]

]);

When I comment out the textarea part, then the file linking works again.
However, then I am now wondering, how can I change the fields default without destroying its behavior?

I posted about a very similar issue earlier today: `now` default stops working when extending date field - #2 by trych

The code for setting these defaults is orginally by @rasteiner from this thread: Cannot extend existing field - #3 by trych

Thanks!

Have you actually tried to apply the hack suggested in that post, i.e. assigning the type property?

I have now added an extra prop:

'type' => 'textarea',

Still gives the same error, unfortunately.