image rotation fails if there is an external file system

Bug #1975712 reported by Christina Thee Roperto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Unassigned

Bug Description

Rotating image breaks when using objectfs plugin as an external file system.

Steps to reproduce (with 21.10):

1. Fresh install mahara
2. Install https://github.com/catalyst/mahara-module_aws and https://github.com/catalyst/mahara-module_objectfs
3. Configure the plugin with test s3 crendentials
4. Add this in config.php

$cfg->externalfilesystem = array(
   "includefilepath" => "module/objectfs/classes/s3_file_system.php",
   "class" => "module_objectfs\\s3_file_system"
);

5. Upload an image on the artefact (site/artefact/file/index.php)
6. Rotate the image. It would be broken and the only way to fix is to move back orientation to 0

This is related to: https://bugs.launchpad.net/mahara/+bug/1776364

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi Christina,

Thanks for reporting this. Since it relates to the interaction with a plugin, it would be best if you looked into that to provide a fix as we don't have access to AWS in order to give that a go. If there is a fix that can be made in Mahara and doesn't impact the regular file system, it would be great if you provided that. :-)

Thank you
Kristina

Changed in mahara:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Christina Thee Roperto (christinatheeroperto) wrote : Re: image rotation fail if there is an external file system

Hi Kristina,

Thank you. I'll provide the fix, I'm still trying to figure out how to pass the automatic test. Will let you know once it's done :)

Kind regards,
Christina

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review
summary: - image rotation fail if there is an external file system
+ image rotation fails if there is an external file system
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/c/mahara/+/12826
Committed: https://git.mahara.org/mahara/mahara/commit/2229997e7e3f0e4eeed7c83a9ce2ce0f1f5b3050
Submitter: "Robert Lyon <email address hidden>"
Branch: main

commit 2229997e7e3f0e4eeed7c83a9ce2ce0f1f5b3050
Author: Christina Thee Roperto <email address hidden>
Date: Thu May 26 15:20:42 2022 +1000

bug 1975712: fix image rotation on external file system

removing the flag $generateifpossible
when checking if resizedimagefile is readable

Change-Id: I84fa7451539d158f3de9a68b26079601126c89c2

Robert Lyon (robertl-9)
Changed in mahara:
milestone: none → 22.10.0
status: Confirmed → Fix Committed
Robert Lyon (robertl-9)
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.