• Resolved mashrurrahman

    (@mashrurrahman)


    I’m facing this weird issue with wpgraphql queries. When the page isn’t published, I am able to see the acf draft mode fields in the previews. But when the page is published, the draft mode doesn’t show up when I’m trying to preview the page. I’m using Faust + WP Headless setup Did anyone else faced this issue? here’s my query:

    query GetPageData( $id: ID! $idType: PageIdType $asPreview: Boolean = false ) {
    page(id: $id, idType: $idType, asPreview: $asPreview) {
    title
    content
    testingAcf {
    content
    }
    }
    }

    • This topic was modified 10 months, 3 weeks ago by mashrurrahman.
Viewing 1 replies (of 1 total)
  • Plugin Author Jason Bahl

    (@jasonbahl)

    @mashrurrahman are you using the Gutenberg Block Editor or the “Classic Editor”?

    If you are using the block editor, there’s a known core WordPress issue that prevents meta from being previewed (not just ACF meta, but any meta). You can read more about it in the original Github Pull Request that added preview support for WPGraphQL for ACF:

    NOTE ABOUT GUTENBERG: Because of a core bug with Gutenberg, meta (including ACF fields) are not persisted to the database for previews, so the fields cannot be exposed by WPGraphQL for previews when using ACF and Gutenberg together. Previewing ACF fields with the classic editor works fine.. This is not an ACF bug, this is a core Gutenberg bug.

    SEE:?WordPress/gutenberg#16006. I commented details about the issue here as well:?WordPress/gutenberg#16006 (comment)

    https://github.com/wp-graphql/wp-graphql-acf/pull/153

    If you are NOT using the block editor, and are still experiencing issues, we’ll need more information to understand what you’re expecting vs. what’s actually happening. We’ll need proper steps to reproduce including an ACF Field Group export and additional “steps to reproduce”. You can provide that information by opening a new issue on the WPGraphQL for ACF Github repository: https://github.com/wp-graphql/wpgraphql-acf/issues/new/choose

Viewing 1 replies (of 1 total)
  • The topic ‘WPGraphQL ACF Draft mode isn’t working’ is closed to new replies.