Closed (duplicate)
Project:
Views data export
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Mar 2020 at 14:34 UTC
Updated:
17 Oct 2025 at 19:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
cosolom commentedTry this patch.
Comment #3
tobiberlinThe patch works well when display redirect is set. What is missing is the possibility to use the views argument within the custom redirect. The main probem is that there is no token defined to get the argument. I just solved this by defining a custom token - maybe this would be something which should be solved in views module?!
In this way you can define a custom redirect path like "/node/[view:argument_1]"
Comment #4
alianov commentedadding to #2,
an instance of EntityInterface as a url parameter (%group), fails in UrlGenerator.
Might be a bug in core.
Comment #5
alianov commentedComment #6
jeremyr commentedPatch in #4 works great for me. Specifically needed the
%groupparameter in my case.Comment #7
manish-31 commentedPatch #4 works perfectly for me. Thanks @alianov
Comment #8
svendecabooterI can confirm patch #4 fixes this issue for me as well.
Comment #9
golddragon007 commentedIndeed #4 is working, but it does not fulfil the whole issue.
"For custom redirect we should expose the view arguments as tokens" implementation missing.
I do see that the original code supports tokens, but it seems that does not allow to use of arguments of the current URL.
Like:
node/%
node/%node
Comment #10
jweowu commentedCross-referencing with #3337622: Batch data export triggers MissingMandatoryParametersException with contextual argument in URL in case followers of this will also understand how to resolve that.
Comment #11
sanju_bera commentedTry the patch for implementation of "For custom redirect we should expose the view arguments as tokens"
Created a view token which will take view path component as a variable argument.
Comment #12
amanp commentedI confirm that patch in #4 resolves the MissingMandatoryParametersException for display redirects with Drupal 10.2 / views_data_export:1.4
Comment #13
yousefanbar commentedI confirm that patch in #4 works great for me with Drupal 9.5.11 / views_data_export:1.4
Comment #14
aaronbaumanMaybe I'm missing something, but this patch works for me.
Very simply: we already have everything we need to generate the route from the view.
Comment #15
abdulaziz zaidthanks @aaronbauman
if I use Custom redirect path:
the patch is not working.
if I use Redirect to this display:
your patch is working with and without checked 'Include query string parameters on redirect'
you should pass the arg if the 'Include query string parameters on redirect' is checked.
Comment #16
mediabounds commentedThe patch in #14 works for me.
Previous comments requested being able to use path arguments as tokens if a custom redirect path is specified, but that is already possible (though not obvious).
For example, if you had a redirect path of
/users/%uid/submissions/exportand wanted to redirect to/user/%uid/export-complete, you could specify the following in Custom redirect path:/users/[current-page:url:args:value:1]/export-completeComment #17
steven jones commentedThanks for the patch in #14 we should get some tests in for this and make sure it works and continues to work!
Comment #18
chetananemade commentedHi,
The patch in #11 worked well for us with Drupal 10.2 and Views_data_export 1.4.
However, after upgrading to Drupal 10.3 and Views_data_export 1.5, we have updated the patch in #11 to make it compatible with the new versions.
Comment #19
cp19112000 commentedComment #20
cp19112000 commentedTemporary solutions without errors or warnings (Work for Drupal 10.3.11, views_data_export 8.x-1.5)
View commerce_promotion_coupons (page_1) config- - Path: promotion/%/coupons
- - Add a contextual filter raw value from URL
In view commerce_promotion_coupons (data_export) config- - Path: promotion/%/export-coupons
- - Redirect to this display: page_1
- - Add a contextual filter raw value from URL
Then add this hook
Comment #21
aaronbaumanThis was fixed yesterday by #3485587: Error on redirect to display that uses contextual filters and route parameters