Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

bad request for non-existent image file #1537

Closed
sujeethk opened this issue Oct 1, 2016 · 2 comments · Fixed by #1538
Closed

bad request for non-existent image file #1537

sujeethk opened this issue Oct 1, 2016 · 2 comments · Fixed by #1538

Comments

@sujeethk
Copy link
Contributor

sujeethk commented Oct 1, 2016

Manage social accounts settings page currently does one bad request for a non-existent file.

image

This needs to change on L6 of manage-social-accounts.client.view.html:
<img ng-src="/modules/users/client/img/buttons/{{vm.user.provider}}.png">
to:
<img ng-src="{{vm.user.provider === 'local' ? '' : '/modules/users/client/img/buttons/'+vm.user.provider+'.png'}}">

@mleanos
Copy link
Member

mleanos commented Oct 1, 2016

I've seen this before. Definitely a bug.

The real issue is the DOM is trying to load this non-existent image because the container is only hidden but still loaded into the DOM.

We should change the condition on that DIV to use ng-if:

ng-if="vm.user.provider !== 'local'"

@mleanos mleanos added this to the 0.5.0 milestone Oct 1, 2016
@mleanos mleanos self-assigned this Oct 1, 2016
@sujeethk
Copy link
Contributor Author

sujeethk commented Oct 1, 2016

For some reason when i tried ng-if last night it wasn't working. I retried on a fresh copy of master and ng-if now and it works fine. Maybe i was doing something stupid

mleanos pushed a commit that referenced this issue Oct 2, 2016
Removes a bad image request from manage social account settings page
Ideas from #1537, suggestions from @mleanos

Fixes #1537
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants