← Back to team overview

mahara-contributors team mailing list archive

[Bug 1977671] A patch has been submitted for review

 

Patch for "main" branch: https://reviews.mahara.org/c/mahara/+/12835

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1977671

Title:
  External system tries to get the remote path even when it's not
  enabled.

Status in Mahara:
  New

Bug description:
  When trying to download a file, it needs to check if an external file
  system is enabled before it goes off to object storage like S3 to try
  to download the file.

  
  Steps to reproduce: 
  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. Ensure that Enable transfer tasks is unticked (we installed the plugin but not using it yet). 
  5. Add this in config.php
  $cfg->externalfilesystem = array(
     "includefilepath" => "module/objectfs/classes/s3_file_system.php",
     "class" => "module_objectfs\\s3_file_system"
  );
  6. Upload an image on the artefact (site/artefact/file/index.php)
  7. Rotate the image. It would be broken and the only way to fix is to move back orientation to 0
  8. If possible, check the logs and you will see it's trying to grab a file from S3

  
  At the moment, when downloading/rotating a file where an external system plugin is installed, it doesn't check whether it's enabled or not. It only checks if there is an external system and then tries getting the remote path if it fails getting local path. 

  PS: this is very similar to
  https://bugs.launchpad.net/mahara/+bug/1975712  however in this case
  the external system is not enabled but it's still trying to download
  the image from S3. It should check first if it's enabled, if disabled
  then it should proceed to get local path.

  I understand this is quite specific. Please let me know if you need
  more information from me.

  I will create a patch for this :)

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1977671/+subscriptions



References