Skip to content

fix(previews): URI is a full URL #198

Closed

Description

@ahuseyn

@moonmeister:

I'm curious, why is the URI a full URL, is this something we're doing? URIs should never be URLs. AKA no host/post/origin/protocol.

image

Disabling previews fixes this:
image

I'm also curious why the slug and uri don't match. I suspect this causes potential issues with seedQuery Template resolution and other things:
image

Originally posted by @moonmeister in #176 (comment)

Activity

  1. changed the title [-]bug: URI is a full URL[/-] [+]fix(previews): URI is a full URL[/+] on May 19, 2025
  2. moved this from 🆕 Backlog to 🔖 Ready for Development in Headless OSSon Jun 3, 2025
  3. moved this from 🔖 Ready for Development to 🆕 Backlog in Headless OSSon Jun 3, 2025
  4. ahuseyn commented on Jun 17, 2025

    @ahuseyn
    ContributorAuthor

    This one seems to be the expected behavior of WPGQL and HWP Previews. WPGraphQL returns preview URL in the URI field if you set asPreview to true. What HWP Previews does is just to replace previews link with the user provided link, which happens to be full URL, including frontend domain, rather than a URI.

    In my opinion this is actually good, because preview URL will be updated not just in wp-admin, but also in WPGraphQL.

    Plus you get the same behavior when you enable Faust.

    @moonmeister @colinmurphy I'm closing this now, but feel free to reopen if you don't agree.

  5. moved this from 🆕 Backlog to ✅ Closed in Headless OSSon Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Area] PreviewsIssues for the HWP Previews plugin[Type] BugAn existing feature is broken

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions