Skip to content

Solution added for Media bulk upload module issue on Pantheon. #9514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sandipsmarty
Copy link

@sandipsmarty sandipsmarty commented Apr 14, 2025

Summary

Drupal Modules with Known Issues - Solution for Drupal Media Bulk Upload issue on Pantheon.

The previous solution configuring "Upload Location" to public://sites/default/files/private, doesn't actually work on Pantheon Test and Live environments, because Test and Live environments have multiple containers/appservers. The Solution only works on Dev as it has single container.

@sandipsmarty sandipsmarty requested a review from a team as a code owner April 14, 2025 10:27
Copy link

👋 @sandipsmarty
Thanks for opening your first pull request! @pantheon-systems/docs-admins is excited to review this!

If you like this project, please ⭐star⭐ our repo.

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9514-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

@rachelwhitton
Copy link
Member

rachelwhitton commented Apr 16, 2025

@sandipsmarty can you confirm the path set by the override has been created on the test and live environments?

After the patch is applied and the following config override added to settings.php, the folder (e.g., /files/private) must be created manually via SFTP if it does not already exist on both Test and Live environments:

// Ensure that DropZoneJS works in the live environment
// (which has multiple web heads).
$config['dropzonejs.settings']['tmp_upload_scheme'] = 'private';

@rachelwhitton rachelwhitton self-assigned this Apr 16, 2025
@rachelwhitton rachelwhitton added Topic: Drupal topic: App Servers / Environments Issues around env variables and other things within applications containers Process: SME Wanted Issues/PRs that benefit SME. Set a date to proceed if SME input does not come labels Apr 16, 2025
@sandipsmarty
Copy link
Author

@rachelwhitton I am not sure about this patch, haven't tried it, also in my settings.php the above config which you mentioned doesn't exists. The solution about media bulk upload mentioned in the pantheon public facing doc doesn't work on Pantheon Test/Live envs. I faced this issue for EFL customer, recently migrated on Pantheon from Acquia. I did some research and found the alternate solution I mentioned in this PR which resolved the customer issue.

@rachelwhitton
Copy link
Member

rachelwhitton commented Apr 16, 2025

I don't think manually editing settings yaml files is the right approach for an override like this, we'd want to set in code and tracked in git and imported to the db once in version control

Also I'm curious if maybe there's an override in that site setting this to something undesirable system.file.path.temporary? Can you run drush cget dropzonejs.settings --include-overridden and drush cget system.file.path.temporary --include-overridden and share your results?

@rachelwhitton rachelwhitton added Process: Needs SME Issue or PR that won't move forward without subject-matter expert contribution and removed Process: SME Wanted Issues/PRs that benefit SME. Set a date to proceed if SME input does not come labels Apr 16, 2025
@lcatlett
Copy link
Member

That proposed patch only works for subset of use cases. The comments in the varios d.o issues about this are missing that the primary reason why dropzone has these challenges - it is because it doesnt chunk uploads, so what I recommend is to use this patch to fix the underlying issue https://www.drupal.org/project/dropzonejs/issues/3125682 and then a callout that if errors persist that the path should be updated to the non-temporary options on Pantheon that @sandipsmarty validated on current customer engagements

@sandipsmarty
Copy link
Author

I verified, this patch https://www.drupal.org/project/dropzonejs/issues/3125682 doesn't resolve the bulk media upload issue on Pantheon Test/Live environments. But changing the dropzonejs settings ['tmp_upload_scheme'] from temporary to public or private actually fixes the issue.

@sandipsmarty
Copy link
Author

@lcatlett @rachelwhitton
Alternate solution of Media bulk upload would be https://www.drupal.org/project/media_library_bulk_upload/ along with a patch https://www.drupal.org/project/media_library_bulk_upload/issues/3461352. This module doesn't depend on dropzoneJS, but it's developed based on Drupal's file upload mechanism. I have tested it out and it works fine, I had to disable dropzoneJS module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Process: Needs SME Issue or PR that won't move forward without subject-matter expert contribution topic: App Servers / Environments Issues around env variables and other things within applications containers Topic: Drupal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants