Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

Destination not found Error - Even though destination is set

Started by Martin 6 years ago · 3 replies · 919 views
6 years ago

Hi,
I'm trying to create an conditional flexible field. I followed the instructions and can create this fields as long as they are text-fields.
As soon as I try to implement a 'file'-type field I get an 'Destination not found' error. Even though I use destination: "@self".
The problem could be related to issue 322 but issue 322 is marked as closed.
I tried it both in 1.6.19 and 1.7.0-rc. The Forms-Plugin is version 4.0.1
Here is the yaml-file that reproduces that error (Create a page using this blueprint and try to upload a picture):

YAML
title: Title
'@extends':
  type: default
  context: blueprints://pages

form:
  fields:
    tabs:
      fields:
        content:
          unset@: true
        costum:
          ordering@: -10
          type: tab
          title: List-items
          fields:
           header.picture_select:
              type: list
              style: vertical
              label: Liste mit Selektion
              classes: field-selection
              fields:
                .slider:
                  type: fieldset
                  title: Slider images
                  fields:
                    .slider.image1:
                      type: file
                      label: linkes Bild
                      destination: '@self'
                      multiple: false
                      accept: 
                        - 'image/*'
last edited 01/06/20 by Martin
6 years ago

That does look similar to the closed issue you linked.

Does this only happen when creating pages using this blueprint or does it work when you edit an existing one? I ask because I've had similar errors (in much older versions) because (I assumed) Grav was trying to upload to a page folder that won't exist until the page is created. I don't think that had anything got to do with nesting fields though, so my experience could be completely unrelated.

6 years ago

If I understand correctly, your asking whether this happens when the page folder already exists? Yes, it does

6 years ago

Yes that's what I'm asking. I guess your problem is not related to the issue I experienced.

If you are pretty confident this is the same as Github issue 322 (looks like it to me). you can still comment on the closed issue and it may be reopened. To satisfy yourself it's reproducible, it may help to set up a test on a fresh Grav install. Then describe the steps you took to build that test so that the maintainers can check it easily themselves. Bugs do return in later versions sometimes.

You could also open a new issue referencing that issue and maybe even this post.

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1145 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 67 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 142 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 118 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 136 7 months ago