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

Vuex bug with included resources #370

Closed
Tracked by #371
Decipher opened this issue Nov 16, 2021 · 0 comments · Fixed by #374
Closed
Tracked by #371

Vuex bug with included resources #370

Decipher opened this issue Nov 16, 2021 · 0 comments · Fixed by #374
Labels
bug Something isn't working module: druxt Related to the `druxt` module module: entity Related to the `druxt-entity` module module: views Related to the `druxt-views` module

Comments

@Decipher
Copy link
Member

Decipher commented Nov 16, 2021

Describe the bug
There appears to be an issue with the Vuex store handling of included resources when using the the new Entity Query include option.

I've seen the issue triggered when using HRM on the Entity Query examples, as well as within the Konstruukt site inside of a DruxtView component.

Needs further investigation.

To Reproduce

  1. Have a View of content rendered via Druxt View
  2. Have a Theme component for that view that iterates over the results and renders a DruxtEntity component with the settings property set to include a related resource:
<template>
  <div>
      <DruxtEntity
        v-for="result of results"
        :key="result.id"
        :type="result.type"
        :uuid="result.id"
        :mode="mode"
        :settings="{
          query: {
            include: ['field_video']
          }
        }"
      />
  </div>
</template>

This triggers a Vuex mutation error.

It is still possible to set the entity query include via the the Theme component:
Edit: It appears that this version can also cause the issue, so it is not a valid workaround.

<script>
export default {
  druxt: {
    query: {
      include: ['field_video']
    }
  }
}
</script>

Expected behavior
Included resources should be correctly added to the Vuex store and available both in server and client side.

Media
image

Your Environment (please complete the following information):
N/A

Additional context
N/A

@Decipher Decipher added bug Something isn't working module: entity Related to the `druxt-entity` module module: views Related to the `druxt-views` module module: druxt Related to the `druxt` module labels Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module: druxt Related to the `druxt` module module: entity Related to the `druxt-entity` module module: views Related to the `druxt-views` module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant