Deleting background image crashes skin

Bug #1240042 reported by Gordon McLeod
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Critical
Robert Lyon

Bug Description

I was testing the new skins feature on Mahara Dev site and found that if I added an image to the skin for background, then later deleted the image from my file repository (I was switching to a different image), the skin becomes unavailable to re-edit because it couldn't find the original image - I had to delete the skin and start again from scratch. What I would expect to happen is that if a skin / theme image is deleted it should switch to the default (no image) or simply display an empty placeholder block to show that there was supposed to be an image file. Being locked out if the image is deleted from the backend makes this a nasty learning experience with the new feature!

Regards, Gordon.

Revision history for this message
Robert Lyon (robertl-9) wrote :

Hi Gordon,

Thank you for testing out the skins feature in Mahara and thank you for submitting a skin on mahara.dev.

Yes, there needs to be better handling of how skins behave if their background images are removed.

I will try and make a patch to handle this scenario.

Cheers

Robert

Changed in mahara:
importance: Undecided → Critical
status: New → In Progress
assignee: nobody → Robert Lyon (robertl-9)
Revision history for this message
Robert Lyon (robertl-9) wrote :

I have added a patch for this problem:
https://reviews.mahara.org/#/c/2613/

It checks to see if artefact actually exists before adding it to artefact chooser. if it doesn't exist anymore then ignores the value.

On editing the skin and saving again the thumb image will be updated correctly.

Changed in mahara:
milestone: none → 1.8.0
Revision history for this message
Robert Lyon (robertl-9) wrote :

There is another bug here https://bugs.launchpad.net/mahara/+bug/1240244 looking into making this more robust by alerting a user before they delete the image that it is being used in a skin

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

Reviewed: https://reviews.mahara.org/2613
Committed: http://gitorious.org/mahara/mahara/commit/8ceba6f16466a1a9ad7ca33d1be03612dd50fae2
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 8ceba6f16466a1a9ad7ca33d1be03612dd50fae2
Author: Robert Lyon <email address hidden>
Date: Wed Oct 16 09:41:27 2013 +1300

Allowing editing of skin if bg image has been deleted (bug 1240042)

Have added a basic check to see if artefact record exists with
the id given.

Don't need to check if they have access to the artefact as that is
handled later - just need to see if it exists or not.

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

Aaron Wells (u-aaronw)
Changed in mahara:
status: In Progress → Fix Committed
Aaron Wells (u-aaronw)
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.