Missing image file in theme raw: no_userphoto100

Bug #1845051 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned

Bug Description

When we try and fetch the user's profile icon in some instances we get the following error:

Missing image file in theme raw: no_userphoto100

This is because it is trying to look for a file called no_userphoto100.jpg, which does not exist

And it does this because it checks for no_userphoto100 against an array of extensions

The problem stems from the setting of the 'notfound' option for the remote_avatar_url function and the default size being 100 and out default image not being suffixed with 100 (unlike the other options).

To test:
1) Make sure your user has the default profile icon set
2) Then go to: Administration -> Extensions -> Plugin configuration
3) Click on the cog for Mahara mobile and make sure it's enabled / setup with manual tokens
4) Go to Account -> Settings -> Connected Apps -> Mahara mobile and generate a token.
5) Copy this token and add it to the wstoken part of the following url

module/mobileapi/download.php?wsfunction=module_mobileapi_get_user_profileicon&width=60&wstoken=

Then go to that url in your site - you will see the default icon at width 60px

Then take out the &width=60 part

You should see the default icon at width 100px but you don't - instead you get 404

Robert Lyon (robertl-9)
Changed in mahara:
importance: Undecided → Medium
milestone: none → 19.10.0
status: New → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/10370

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10370
Committed: https://git.mahara.org/mahara/mahara/commit/48c94cda4d5157a87f7e167c34aaae22efb8b744
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 48c94cda4d5157a87f7e167c34aaae22efb8b744
Author: Robert Lyon <email address hidden>
Date: Tue Sep 24 09:57:58 2019 +1200

Bug 1845051: The wrong no_userphoto file is checked for

When fetching profileicon for mobile

- see bug for testing instructions

behatnotneeded

Change-Id: I494b8e6ddcc697478b9ff334df900e42ff07aaab
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.