Skip to content

fix(previews): preview doesn't work as expected when Faust configured #233

Closed

Description

@ahuseyn

When Faust enabled and "Front-end site URL" entered in the settings, it overrides the default behavior of HWP Previews.

NOTE: Removing "Front-end site URL" from Faust settings seems to fix this issue

This is what you get by clicking the preview button with the config below:

  • Faust enabled, front-end URL set

Expected:

Should've opened default WordPress preview template with an iframe, showing frontend

Observed:

It redirects to the frontend URL defined in Faust settings, with different parameters than specified in HWP previews

Image
Image

This is for redirected previews in HWP Previews:

  • Faust enabled, front-end URL set

Expected:

Should've redirected to the URL specified in HWP previews plugin

Observed:

Redirects to the domain specified in HWP Previews plugin, without respecting the parameters

Image
Image

Activity

  1. colinmurphy commented on May 29, 2025

    @colinmurphy
    Member

    @ahuseyn @wpengine/headless-open-source @wpengine-cpierce

    One option might be:

    1. Add a config option to Faust to disable previews
    2. Use the activation hook in HWP Previews to disable Faust Previews (whether that is in Faust or HWP Previews I am not sure).
  2. changed the title [-]fix(previews): iframe preview doesn't work when Faust configured[/-] [+]fix(previews): preview doesn't work as expected when Faust configured[/+] on May 30, 2025
  3. moved this from 🆕 Backlog to 🏗 In progress in Headless OSSon Jun 2, 2025
  4. self-assigned this
    on Jun 2, 2025
  5. linked a pull request that will close this issuefeat: Enable Faust integration #240on Jun 5, 2025
  6. ahuseyn commented on Jun 5, 2025

    @ahuseyn
    ContributorAuthor

    @colinmurphy @wpengine/headless-open-source
    Redirected previews conflict will be fixed with #240. iframe conflict however is a bit complicated. Faust provides a filter to disable frontend redirects for the specific URLs, but those URLs have to be exact match. Thus all the preview URLs have to be supplied to that filter to disable redirects as far as I understand.

    On the other hand, and more importantly we don't want to suppress the redirect feature of Faust (an independent plugin) for an optional feature (iframe) of HWP Previews. Instead I'll document this conflict in #229 and provide an instruction on how to resolve this conflict, by removing frontend_url from Faust.

  7. moved this from 🏗 In progress to 👀 In review in Headless OSSon Jun 5, 2025
  8. colinmurphy commented on Jun 5, 2025

    @colinmurphy
    Member

    @ahuseyn

    Thanks for so much context here. I think that sounds like a good approach. We might consider at some point in a breaking change to remove previews from Faust too which I guess would solve this issue too?

  9. ahuseyn commented on Jun 6, 2025

    @ahuseyn
    ContributorAuthor

    @colinmurphy we already remove the previews link replacement functionality of Faust by enabling the HWP Previews with #240. The iframe issue here is related to "redirect all to frontend" feature of Faust which is not connected to the previews. That's why I think we shouldn't do anything about it. If users want to use iframe with Faust, they can disable the redirect functionality by removing frontend url from the settings, and I'll document this fix.

  10. moonmeister commented on Jun 6, 2025

    @moonmeister
    Member

    @colinmurphy we already remove the previews link replacement functionality of Faust by enabling the HWP Previews with #240. The iframe issue here is related to "redirect all to frontend" feature of Faust which is not connected to the previews. That's why I think we shouldn't do anything about it. If users want to use iframe with Faust, they can disable the redirect functionality by removing frontend url from the settings, and I'll document this fix.

    Wouldn't removing the front-end URL from Faust config also break link rewrites? Not sure that's a viable fix for this issue.

  11. moved this from 👀 In review to ✅ Closed in Headless OSSon Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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