- Issue created by @jhinds
- Status changed to Needs work
over 1 year ago 12:10am 15 December 2023 - ππΊHungary nevergone NyΓregyhΓ‘za, Hungary, Europe
Please test and review.
- πͺπΈSpain markus_petrux
For us it is working properly. The data export display provides an option to choose the Facet source. Using the correct option worked for us... we're using facets_form module too.
Kind regards
- πΊπΈUnited States jhinds
The patch in #3 works for me. Results are reflecting facet selections. Thanks!
- π¬π§United Kingdom steven jones
Can we change to a Merge Request please, also:
+++ b/src/Plugin/views/display/DataExport.php @@ -668,7 +668,12 @@ class DataExport extends RestExport { + \Drupal::request()->request->add($query_parameters);
It should be fine to simply change to using this version in all cases? I don't think we need to detect anything here.
- First commit to issue fork.
- πΊπΈUnited States jonraedeke
jonraedeke β changed the visibility of the branch 8.x-1.x to hidden.
- Merge request !80Issue #3395037: Data Export in Batch fails to acknowledge Facet selections β (Open) created by Unnamed author
- πΊπΈUnited States jonraedeke
I created an MR for review based on the comment by steve Jones in #7.
This working really well for me.
- π¬π§United Kingdom mike-kelly
I am still having problems with this in Drupal 10.4.6, with views_data_export v1.6.
I applied the patch in #3 (also tried just using #7), but the facet-related query params are ignored when returning results in batch export mode. Facet filtering works fine in standard export mode.
Setting breakpoints I can see that in display/DataExport.php file, in the buildBatch function, the number of
$total_rows
is correct and takes accounts of facets:if ($view->getQuery() instanceof SearchApiQuery) { // this line returns the correct value $total_rows = $view->query->getSearchApiQuery()->range(NULL, 1)->execute()->getResultCount(); } else { $count_query_results = $view->query->query()->countQuery()->execute(); $total_rows = (int) $count_query_results->fetchField(); }
However, in
batchProcess
, the results returned do not take account of facets.I have selected the correct facet source in the view configuration, as evidenced by the success of standard export.
I am using a searchAPI datasource as a contextual filter if that is relevant.Any suggestions how to troubleshoot this? Thanks.