Problem/Motivation

This error is being presented in the browser console that does not allow downloading files. This says Google Chrome: https://blog.chromium.org/2020/02/protecting-users-from-insecure.html

Error

This issue is reported in the module views_data_export too.
https://www.drupal.org/project/views_data_export/issues/3189135

Steps to reproduce

Files cannot be downloaded in chrome in some urls.

Proposed resolution

Create a patch.

Issue fork vbo_export-3221760

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dmezquia created an issue. See original summary.

dmezquia’s picture

Status: Active » Needs review
FileSize
1.02 KB
dmezquia’s picture

The patch #2 get relative url to prevent mixed content errors when using HTTPS + HTTP.

interdruper’s picture

Status: Needs review » Reviewed & tested by the community

Patch #2 works for me.

jsacksick’s picture

Same patch, with a target blank added to the link as the download doesn't trigger for me.

Graber’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

Cool it works but.. Can't we get the same string using the Link class? Whenever there's API available, it should be used, maybe it's just a case of adding some parameters to the generating method?

dmezquia’s picture

@Graber I see no problem using the file_url_transform_relative() and file_create_url() methods, they are not marked as decrepted and they are also used in many places in the core.

dmezquia’s picture

Version: 8.x-3.2 » 8.x-3.3
Priority: Major » Normal
Status: Postponed (maintainer needs more info) » Needs review
dmezquia’s picture

Hi @Graber, any update on this issue? do you plan to release another release?
I have had to be applying this patch in all the projects where I use it, I use this module a lot.

Graber’s picture

Sorry, I'm totally busy with other things currently and barely find time for VBO. Will handle this tomorrow.

dmezquia’s picture

Thank you @Graber

  • Graber committed fb549c1 on 8.x-3.x
    Issue #3221760 by dmezquia, jsacksick, Graber, interdruper: Cannot...
Graber’s picture

Status: Needs review » Fixed
Graber’s picture

Additional use statement cleanup was also needed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.