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

Bug: Multiple queries fails on page transition to "queries" template #1731

Closed
blakewilson opened this issue Jan 16, 2024 · 0 comments · Fixed by #1737
Closed

Bug: Multiple queries fails on page transition to "queries" template #1731

blakewilson opened this issue Jan 16, 2024 · 0 comments · Fixed by #1737
Assignees
Labels
type: bug Issue that causes incorrect or unexpected behavior

Comments

@blakewilson
Copy link
Contributor

Environment

  • @faustwp/core version: 2.1.0
  • @faustwp/cli version: 2.1.0
  • @faustwp/blocks version: N/A
  • @faustwp/block-editor-utils version: N/A
  • WordPress version: 6.4.2
  • Browser, OS, and other relevant software versions:

Description

On a page transition to a Faust Template using queries, the template will fail and throw a client side error because Faust context is returning undefined. This only occurs on a page transition. Going directly to a page using a Faust Template with queries does not yield the same result.

multiple.queries.bug.mov

Steps to Reproduce

  1. Download the example project locally
  2. Notice the single.js template uses multiple queries
  3. In your WordPress site, add some single blog posts to the nav menu
  4. Build the example project npm run build
  5. Start the example project npm run start
  6. Navigate to the homepage http://localhost:3000, notice everything works as expected
  7. Navigate to a single blog post from the nav menu
  8. Notice the client side error.
  9. Refresh the page, and notice it loads fine.
@blakewilson blakewilson changed the title Bug: Multiple queries fails on page transition from non "queries" template to "queries" template Bug: Multiple queries fails on page transition to "queries" template Jan 16, 2024
@mindctrl mindctrl added the type: bug Issue that causes incorrect or unexpected behavior label Jan 16, 2024
@blakewilson blakewilson self-assigned this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Issue that causes incorrect or unexpected behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants