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

User photoVolumeId incorrect #227

Open
ManiakMill opened this issue Feb 13, 2019 · 5 comments · May be fixed by #285
Open

User photoVolumeId incorrect #227

ManiakMill opened this issue Feb 13, 2019 · 5 comments · May be fixed by #285

Comments

@ManiakMill
Copy link

class User extends Schema
System setting param should be photoVolumeId to photoVolumeUid

User photo field now not available

@markhuot
Copy link
Owner

Ah, thanks, this is a breaking change from Craft 3.1. Let me look at this and make sure I can support 3.0 and 3.1 with the same code or if I need some sort of branch.

@ManiakMill
Copy link
Author

Craft CMS v. 3.1.9.1
Nice TY!

@markhuot
Copy link
Owner

I'm not able to recreate this. I can query user photos without issues. What query/mutation is causing the issue?

{
  users{
    id
    photo{
      url
    }
  }
}

@andygott
Copy link

I ran into this one too, using Craft Pro 3.1.14.

Query:

{
  users {
    photo {
      url
    }
  }
}

Response:

{
  "errors": [
    {
      "message": "Cannot query field \"photo\" on type \"User\".",
      "category": "graphql",
      "locations": [
        {
          "line": 3,
          "column": 5
        }
      ]
    }
  ]
}

Adding the following after this line in the User type fixes it for me:

if (!$volumeId) {
  $volumeId = Craft::$app->getSystemSettings()->getSetting('users', 'photoVolumeUid');
}

@sjimster
Copy link

@markhuot Is this something that will be fixed in an upcoming release? The solution above is working, but I guess its only temporary until the plugin will be updated?

@Tam Tam linked a pull request Jun 28, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants