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 images not appearing #6

Open
theopen-institute opened this issue Jan 20, 2019 · 6 comments
Open

User images not appearing #6

theopen-institute opened this issue Jan 20, 2019 · 6 comments

Comments

@theopen-institute
Copy link

Thanks for making this plugin!

For some reason, my avatar images aren't transferring from moodle to discourse. Based on the debug logs, it looks like your discourse sso plugin is doing its job properly, but I don't understand the backend well enough to know how to test that.

I've posted a thread over at meta.discourse.org, but no responses so far. Any ideas?
https://meta.discourse.org/t/avatars-not-pulling-from-sso/105878

@jazinheira
Copy link
Contributor

I just upgraded our Discourse to v2.2.0beta9 and I'm seeing the same issue. In your Discourse logs are you seeing this error?

Job exception: undefined method `is_supported_image?' for FileHelper:Class

@jazinheira
Copy link
Contributor

Would you also double check that the profile image is accessible from the internet (or your Discourse server, at least)? The one at https://moodle.***.***/pluginfile.php/42/user/icon/fordson/f1?rev=490

@theopen-institute
Copy link
Author

I'm not seeing that error anywhere in the logs, and I can access that link to see an avatar image from any cold browser on any network. It's very strange, as the log seems to indicate that everything should be working. Let me know if there is anything else I can do to help troubleshoot.

(And apologies for the slow response. My github notifications were set improperly.)

@theopen-institute
Copy link
Author

theopen-institute commented Apr 29, 2019

On further investigation, it seems pretty clear that this is an authentication problem. I tested from a range of different web browsers and the proper image loaded, but sometimes when I run a curl command from my discourse server itself I get the dummy "no avatar" icon. Strangely, sometimes I get the proper image too. Does the moodle file api require authentication for user icons?

EDIT: Further details: this is also related to the "force login" setting in moodle. My site has force login set to on, but if it's set to off the avatar loads properly.

@jazinheira
Copy link
Contributor

That's interesting, we do NOT have Force login enabled. I'll see if I can find a workaround but in the meantime I'll add that to the docs.

I noticed another "Force users to log in to view user pictures" setting in Moodle. Is that set to on as well on your installation?

@theopen-institute
Copy link
Author

The “force login for user pictures” setting is off. If I turn it on, I’m not able to get images again.

Moodle’s “logged in as guest” status is still a bit confusing to me, but I think it’s related to the mechanism here.

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

No branches or pull requests

1 participant