Picture of Henrik Aabom
Background images linked to themes now?
by Henrik Aabom - Monday, 31 January 2022, 8:02 AM
 

Hi

Background images are now working again in Vanilla 6, which is great, but I'm wondering if it's working as intended?

First, it seems background images are now linked to themes rather than the course itself, which means added images disappear as you change the theme - untill you change it back.

Second, when you add an image on a given block (or other element), change the theme, add another image on the same block and revert to the first theme, the original image will be gone. This is the part that I don't think is intended.

If this is indeed not intentional, consider this a bug report. I'm personally not a fan of this change, as I like images to complement the course content rather than the styling.

So my question is, can I change back to background images being linked to courses rather than themes in v6.0.1 / 5.18+

Thank you.

Picture of Guy Willis
Re: Background images linked to themes now?
by Guy Willis - Monday, 31 January 2022, 2:20 PM
 

Hi Henrik,

I believe that background images have always been linked with the theme. There is appetite to change this so background images are part of a separate extension to avoid the exact issue you mention but there has been no progress on this to date.

The second issue you describe is certainly peculiar. Are you using two separate themes or swapping between a single themes preset? If two separate themes, do they have the same targetAttribute in bower.json or different?

I look forward to hearing from you,

Guy

Picture of Henrik Aabom
Re: Background images linked to themes now?
by Henrik Aabom - Tuesday, 1 February 2022, 8:18 AM
 

Hi Guy

Thanks for responding!

Just did a test on 5.16, and yes, you are completely right. Odd how this hasn't occured to me before, and apologies for not testing this beforehand. But it does share the second issue.

It's seperate themes with different targetAttributes - I tried uploading af new theme with the same targetAttribute to see if it solved anything, but the authoring tool won't let me install plugins with matching targetAttributes.

 

Picture of Guy Willis
Re: Background images linked to themes now?
by Guy Willis - Thursday, 3 February 2022, 12:35 PM
 

One potential explanation for the defined images on a block disappearing between themes is if the authoring tool is removing the json associated with the old theme when a new theme is applied.

Could you apply a background image to a block, export that course and check the blocks json for the themes target attribute and background image.

Repeat the process with the new theme and background image and compare the old and new json - what appears in the json for the block?