Skip to content

Getting a page by url fails when the page is the homepage, and worpress is installed inside a folder #3775

Description

@d-packs

Description

https://sandbox.dev/testing/ fails to return a page object when https://sandbox.dev/testing/ is the homepage url. other pages work ok.

Image Image

Steps to reproduce

  1. Install wordpress in a folder instead of domain root.
  2. create a page and set it as static home page
  3. try to get the homepage by URI: either pageBy, or page(id: "https://sandbox.dev/testing/", idType: URI)
  4. null is returned.
Image

Additional context

No response

WPGraphQL Version

2.11.2

WordPress Version

6.9.4

PHP Version

8.3

Additional environment details

site is installed in /subfolder instead of /

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have disabled ALL plugins except for WPGraphQL.

  • Yes
  • My issue is with compatibility with a specific WordPress plugin, and I have listed all my installed plugins (and version info) above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: queryRelating to GraphQL Querieseffort: lowAround a day or lessimpact: medMinor performance improvements, fix broad user base issuesobject type: postRelating to the Post Object Typesscope: apiIssues related to access functions, actions, and filtersstatus: actionableReady for work to begintype: bugIssue that causes incorrect or unexpected behavior

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions