HTTP 414 Request-URI Too Long on export button URL with contextual filter

Created on 18 March 2024, about 1 year ago

Problem/Motivation

I have a View that has a contextual filter that has a default value that is a very long string filled by a custom token. The View works fine, but the "Download CSV" link has a URL that it way too long because it includes this token. It is so long that the URL returns HTTP 414 Request-URI Too Long.

The URL is like this:
SITE_BASE_URL/VIEW_PATH/TOKEN?page&_format=csv

If I manually enter this URL, a file with the correct contents downloads:
SITE_BASE_URL/VIEW_PATH?page&_format=csv

In the above examples, VIEW_PATH represents the "menu path or URL of this view" entered in the "Path settings" config.

It is the path that is too long, not the query string, so this is not the same as #2070711: IE, long URLs and exposed filters .

Proposed resolution

Do not include the default values of contextual filters in the URL.

Remaining tasks

Figure out how to do this and implement.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

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

Comments & Activities

Production build 0.71.5 2024