gjbarnard / moodle-theme_adaptable

Adaptable theme for Moodle
GNU General Public License v3.0
7 stars 13 forks source link

Typo in marketing block images file path #18

Open staples1347 opened 10 months ago

staples1347 commented 10 months ago

After upgrading the Adaptable theme version from 2.2.2 to 39.1.6 along with upgrading an old installation from Moodle 3.8 to Moodle 3.9, I noticed none of the Marketing Block images could no longer be found. Looking at the git code for moodle-theme_adaptable , it looks like possibly all versions within git are using adaptablemarkettingimages as the file path instead of adaptablemarketingimages which breaks older installations.

I was able to fix this by manually modifying lib.php , classes/toolbox.php , and libs/admin_confightmleditor.php to change it back to adaptablemarketingimages.

I'm thinking this will probably now need handling added for both adaptablemarketingimages and adaptablemarkettingimages so it doesn't break current modern installations. Would it be possible for you to fix this?

gjb2048 commented 10 months ago

If the error is mine, then I'll attempt to fix it. If the error is a previous developer, then I'll want paying for my time.

gjb2048 commented 10 months ago

Error is not mine, in that the codebase inherited in version 2.0.0 has 'adaptablemarketingimages' for the setting and 'adaptablemarkettingimages' for the serving of the image in lib.php. The setting was later fixed to 'adaptablemarkettingimages'. Both values can't be supported at the same time as the setting can only support one file area at a time.

gjb2048 commented 10 months ago

Therefore 'Can't do' and to change to 'adaptablemarketingimages' would mean a shed load of update code that I'm not prepared to do, as even though the extra 't' is annoying, this is an edge case and not worth the effort unless you'd be willing to compensate me for my time.

gjb2048 commented 10 months ago

Reopen to give time for a reply.

staples1347 commented 10 months ago

Okay thanks for looking into this. If I created a patch or pull request to support serving of images with both paths, would you still want payment to integrate into the main code?