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

DruxtEntity Storybook issue with unpublished content. #522

Closed
Tracked by #512 ...
Decipher opened this issue May 31, 2022 · 2 comments · Fixed by #523
Closed
Tracked by #512 ...

DruxtEntity Storybook issue with unpublished content. #522

Decipher opened this issue May 31, 2022 · 2 comments · Fixed by #523
Labels
bug Something isn't working module: entity Related to the `druxt-entity` module
Milestone

Comments

@Decipher
Copy link
Member

Describe the bug
It appears that unpublished content isn't filtered from the query used by the DruxtEntity Stories, which means that if an unpublished item is returned but the DruxtClient doesn't have access to read the content that the DruxtEntity story doesn't have any UUID's available.

To Reproduce
Steps to reproduce the behavior:

  1. Add two pieces of content, one published and one unpublished, both the same content type
  2. Start Nuxt Storybook and navigate to the Story
  3. No UUIDs available

Expected behavior
The query should filter out unpublished items, and also catch any errors and try to return valid data if available.

Media
image

  response: {
    statusText: 'Some resources have been omitted because of insufficient authorization.',
    data: { errors: [Array] }
  },
  druxt: {
    url: '/api/node/news?fields%5Bnode--news%5D=id%2Ctitle%2Cname%2Cinfo'
  }
}

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 labels May 31, 2022
@Decipher Decipher added this to the 1.0.0 milestone Jun 14, 2022
@Decipher
Copy link
Member Author

The PR for this is ready to be merged, but a manual test should be done to confirm the issue and fix.

The steps are:

  • Run develop branch dev environment in gitpod: https://gitpod.io/#github.com/druxt/druxt.js
  • Use examples/drupal/drupal-9 and examples/nuxt/druxt-site environments and attempt to reproduce issue
  • Swap branch to PR branch feature/522-entity_storybook_bug
  • Build Druxt packages: yarn build from project root
  • Re-run frontend environment, confirm fix?

@Decipher
Copy link
Member Author

Decipher commented Jul 5, 2022

Manually tested and confirmed working.

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: entity Related to the `druxt-entity` module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant