Attached export link not working when https redirect

Created on 24 November 2021, over 2 years ago
Updated 4 July 2022, almost 2 years ago

Problem/Motivation

We have a website that was initially installed using HTTP and when it got to staging env a redirect was applied to use HTTPS, when this happened the display attached export link stopped working because it refers to the HTTP site URL. The issue is originated from what you can see in this picture:

But the views_data_export module forces the use of absolute URLs and that provokes HTTP over HTTPS requests which are blocked for browsers.

Steps to reproduce

  1. Install a drupal site using http, you will need view and views_data_export
  2. Create a view export display and attache it to any other view display
  3. Set certificates to your server and apply all needed changes to have it running using https
  4. Visite the view with export attached button and click it

Proposed resolution

  • Apply a simple change to prevent the use of absolute URLs in the attachTo function

Remaining tasks

  • Create a basic path to change
    $url_options['absolute'] = TRUE;
    to
    $url_options['absolute'] = FALSE;
🐛 Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇨🇺Cuba ldcruz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024