Skip to content

#2274 - fix bug with the generalSettings.url field being removed #2276

Merged
jasonbahl merged 3 commits intowp-graphql:developfrom
jasonbahl:bug/#2274-general-settings-field-in-multisite-is-missing
Mar 7, 2022
Merged

#2274 - fix bug with the generalSettings.url field being removed #2276
jasonbahl merged 3 commits intowp-graphql:developfrom
jasonbahl:bug/#2274-general-settings-field-in-multisite-is-missing

Conversation

@jasonbahl
Copy link
Copy Markdown
Collaborator

What does this implement/fix? Explain your changes.

This updates the call to register_graphql_field to use $this->register_field() for the multisite generalSettings.url field

Does this close any currently open issues?

closes #2274

Any relevant logs, error output, GraphiQL screenshots, etc?

Before (v1.6.12)

In v1.6.12, we can see that we can succesfully query for:

{
  generalSettings {
    dateFormat
    url
  }
}

CleanShot 2022-03-07 at 10 01 11

Regression (v1.7.1)

In v1.7.1 we can see that the same leads to an error, as the field generalSettings.url is not in the Schema

CleanShot 2022-03-07 at 09 59 33

After (current PR)

With this change, we can query the field again:

CleanShot 2022-03-07 at 09 59 05

Any other comments?

This PR doesn't have a test for this, as we don't have the test environment properly setup to run tests in multisite.

I created this issue (#2275) to follow-up.

…moved from multisite installs in the 1.7 release
@jasonbahl jasonbahl added the status: in review Awaiting review before merging or closing label Mar 7, 2022
@jasonbahl jasonbahl self-assigned this Mar 7, 2022
…e (fixes sorting in the UpdateSettings payload)

- use register_graphql_object_type instead of $this->register_object_type for the SettingsGroup to ensure filters are applied on fields
@qlty-cloud-legacy
Copy link
Copy Markdown

Code Climate has analyzed commit b94fccf and detected 0 issues on this pull request.

View more on Code Climate.

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 7, 2022

Coverage Status

Coverage remained the same at 79.261% when pulling b94fccf on jasonbahl:bug/#2274-general-settings-field-in-multisite-is-missing into d4d366d on wp-graphql:develop.

@jasonbahl jasonbahl merged commit c3540d5 into wp-graphql:develop Mar 7, 2022
@jasonbahl jasonbahl mentioned this pull request Mar 7, 2022
@jasonbahl jasonbahl mentioned this pull request May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: in review Awaiting review before merging or closing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multisite generalSettings url field missing in 1.7.x

2 participants