Error message when selecting file in textarea

#1

When I hit the paperclip on the Textarea and choose select file, I get the following error:

Upload seems to work ok. I’m not sure if its an issue with the builder plugin or the textarea. Both are up to date.

Edit: I just tried it outside the builder field and it works fine… @timoetting One for you i think… :slight_smile:

#2

It’ll help @timoetting if you could share the corresponding blueprint :slight_smile:

#3

@distantnative Your wish is my command… nothing fancy…

type:                  group
fields:
  contentbuilder:
    label: Page Blocks
    type: builder
    columns: 1
    max: 99
    fieldsets:

      # Content
      basiccontent:
        label: Basic Content
        extends: blocks/content

      # + More Fieldsets that are not relevant. 

All the content block has in it is this…

type:      group
fields:
  text:
    label: Text
    type:  textarea
    size:  large
Builder plugin and files
#4

We are experiencing this issue as well and have created an issue on Github:

#5

Hey everyone.

The problem seems to be, that every route that ends with */files is processed by the kirby core - even if I try to handle them inside my plugin. The Kirby Builder plugin needs to define custom endpoints for most of the api communication. I use the prefix /api/kirby-builder for these custom endpoints. This works fine for the files and pages field.

The textarea field, however, takes the custom route given by the endpoint object, and puts a /files after it which ends in a route that could look like this: /api/kirby-builder/pages/test+page/fields/builderfieldname+fieldsetname+fieldname/files . This route can not be handles by my plugin anymore, because the kirby core tries to handle it before (and throws and error because it does not understand my custom route in front of the /files part.

Maybe @distantnative or anybody more involved in the kirby core has an idea for a work around so that either the textarea can be configured not to use the /files route or the */files route to be processed by my plugin?

Builder plugin and files
#6

It would be really great of one of the developers (@lukasbestle, @bastianallgeier, @distantnative) could take the time and give me some feedback on this. Unfortunately, I am some kind of dependent on your support here because this leads to an issue in my plugin.

#7

To be honest, this goes a little bit beyond my grasp of these specific routes, I think only @bastianallgeier can help here.

#8

@timoetting Does the textarea field need a custom endpoint within your field or would it be an option to try to make it work with the normal endpoint, while still having custom ones for the files and pages fields?