Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: Media used as fieldGroup inside a fieldGroup not working #590

Closed
anthonykasabian opened this issue Jun 18, 2023 · 1 comment
Closed
Labels

Comments

@anthonykasabian
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
Creating a fieldGroup with a nested fieldGroup of type media/image:

{
      "id": "selectedWorks",
      "labelField": "workTitle",
      "fields": [
        {
          "title": "Work Title",
          "name": "workTitle",
          "type": "string",
          "single": true
        },
        {
          "title": "Selected Media",
          "name": "selectedMedia",
          "type": "block",
          "fieldGroup": [
            "mediaSource"
          ]
        }
      ]
    },
    {
      "id": "mediaSource",
      "labelField": "sourceName",
      "fields": [
        {
          "title": "Source Name",
          "name": "sourceName",
          "type": "string",
          "single": false
        },
        {
          "title": "Source Path",
          "name": "sourcePath",
          "type": "image",
          "isPreviewImage": false,
          "multiple": false
        }
      ]
    }

Than assign it to my contentType:

 {
      "name": "dummypage",
      "pageBundle": true,
      "previewPath": null,
      "fields": [
        {
          "title": "Title",
          "name": "title",
          "type": "string"
        },
        {
          "title": "Works Media Selection",
          "name": "worksMediaSelection",
          "type": "block",
          "fieldGroup": [
            "selectedWorks"
          ]
        },
        {
          "title": "type",
          "name": "type",
          "type": "string"
        } 
      ]
    },

Expected behavior
Creating a list of images inside my selected Works Album and list all the picture below.

Screenshots
Resulting in just returning the Source Name.

---
title: dummy new one
worksMediaSelection:
  - workTitle: work
    selectedMedia:
      - sourceName: source
        fieldGroup: mediaSource
    fieldGroup: selectedWorks
type: dummypage
---

Desktop (please complete the following information):

  • OS: OSX 13.2
  • Browser Chrome, Safar...
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@anthonykasabian anthonykasabian added the bug Something isn't working label Jun 18, 2023
@estruyf
Copy link
Owner

estruyf commented Jun 20, 2023

@anthonykasabian, thanks for opening this issue; it was indeed a bug in the image field and mapping to the sub-block of its contents.

I have investigated it and came up with a fix. Feel free to give it a try in the latest beta version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants