Panel field named 'upload' breaks panel on save (kirby 2.3.0)

i know kirby 2.3.0 is not current version and i will test with 2.3.2 asap but i wanted to report this issue anyway. are there reserved words for naming panelfields?

i have a type:text panel field named ‘upload’ which breaks panel on saving content causing error in kirby/toolkit/lib/upload.php on line 198.

fields:
  upload:
    type: text

Looks as if that interferes with the upload class somehow. In general, there are no official restrictions apart from the ones mentioned here, but I recall that I had an issue once with naming a custom field.

issue persist in 2.3.2. i find it suspicious its causing an error in upload.php even if the field type is text and should not have anything to do with uploading, right?

i see. thats quiet a long list of not allowed fieldnames then and with each version there might new ones added. https://getkirby.com/docs/cheatsheet#page

in future i will prefix all my fieldsnames just to make sure this does not happen again.

It’s probably some JavaScript that triggers calling of the Upload class, because of the name of the field, on save resulting in an error that the file is missing.

maybe panel could check name of fields against a list of reserved keywords/functions and output a warning – when parsing the blueprint and outputting the fields as html?

We already had such a feature, which issued a warning for all page functions, briefly, but it was removed again because of complaints. Most keywords don’t throw an error in the panel, you only have to take care when trying to render those fields in your templates.

As regards the upload issue, maybe you want to create an issue on GitHub?

its ok. ‘upload’ is not a very self explanatory name. i will rename the field to uploadedfile in the blueprint and use a for-loop to copy value to renamed field in all content pages.