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

Fix: Block fields in object bricks are always output as null even though they are filled #734

Merged
merged 3 commits into from May 5, 2023

Conversation

blankse
Copy link
Contributor

@blankse blankse commented Apr 26, 2023

Field config:

  -
      attributes:
          attribute: '?{"containerKey":"BrickName","fieldname":"fieldName","brickfield":"blockField"}~blockField'
          label: Test
          dataType: block
      isOperator: false

GraphQL Query:

{
  getTestClass(id: 123) {
    testDE: test(language: "de") {
      medium
    }
    testEN: test(language: "en") {
      medium
    }
  }
}

Output before:

{
  "data": {
    "getTestClass": {
      "testDE": null,
      "testEN": null
    }
  }
}

Output after first commit:

{
  "data": {
    "getTestClass": {
      "testDE": [
        {
          "medium": "Luft"
        }
      ],
      "testEN": [
        {
          "medium": "Luft"
        }
      ]
    }
  }
}

Output after last commit:

{
  "data": {
    "getTestClass": {
      "testDE": [
        {
          "medium": "Luft"
        }
      ],
      "testEN": [
        {
          "medium": "Air"
        }
      ]
    }
  }
}

@fashxp fashxp added the Bug label May 4, 2023
@fashxp fashxp added this to the 1.5.7 milestone May 4, 2023
@mcop1 mcop1 self-assigned this May 5, 2023
@mcop1
Copy link
Contributor

mcop1 commented May 5, 2023

Thank you!

@mcop1 mcop1 merged commit 55683f7 into pimcore:1.5 May 5, 2023
5 checks passed
@blankse blankse deleted the fix_block_in_object_brick branch May 5, 2023 10:46
mcop1 pushed a commit that referenced this pull request May 10, 2023
…ugh they are filled (#734)

* Fix: Block fields in object bricks are always output as null even though they are filled

* Fix PhpStan

* Fix: language arg is ignored
@lukmzig lukmzig added this to the 1.5.7 milestone May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants