Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0.0] GraphQL api retour edge producess an internal server error #238

Closed
CompleteBaltics opened this issue May 23, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@CompleteBaltics
Copy link

Describe the bug

When using the GraphQL API the retour edge produces an internal server error.

To reproduce

  1. Open GraphiQL in Craft CMS and select Full Schema
  2. Try running this query:
query Redirect($uri: String) {
  retour(uri: $uri) {
    redirectDestUrl
  }
}

with query variables:

{
  "uri": "test"
}
  1. This produces an internal server error:
{
  "errors": [
    {
      "debugMessage": "Typed static property nystudio107\\retour\\Retour::$currentException must not be accessed before initialization",
      "message": "Internal server error",
      "extensions": {
        "category": "internal"
      },
      "file": "/app/backend/vendor/nystudio107/craft-retour/src/services/Statistics.php",
      "line": 168,

Expected behaviour

Should return redirectDestUrl if matched with an existing redirect or an empty array

Screenshots

image

Versions

  • Plugin version: 4.0.0
  • Craft version: 4.0.3
@CompleteBaltics CompleteBaltics added the bug Something isn't working label May 23, 2022
khalwat pushed a commit that referenced this issue May 24, 2022
@khalwat
Copy link
Contributor

khalwat commented May 24, 2022

Addressed in: 86d4236

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-retour": "dev-develop-v4 as 4.0.1”,

Then do a composer clear-cache && composer update

@khalwat khalwat closed this as completed May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants