I’m stuck on a subject for a few days and was wondering if anyone can help me.
I’m working on a Drupal 9 website displaying custom table data and I need to provide csv/xls export links for it.
For the moment, I’ve defined a view consuming the custom table data thanks to Views Custom Table and it is working fine.
I’ve installed the Views Data Export module and configured a display to export data as CSV. This display is attached to the base display.
The CSV button is show on the view, and when I’m logged in as admin, everything is working fine. But when I’m juste an authenticated user, when I click on the button, the display attached to the csv export is rendered and exported in csv (so there is all the HTML in the file). I think it is a permission issue : export uses REST core module of Drupal and this one is performing permission check on entity (for example, user is able to access the entity). But in my view, there is no entity because data comes from the View Custom Table module (through hook_data).
I’m not sure if there is a simple solution, or if I need to define my own endpoint (and find a solution to keep exposed filters !). Moreover, Views Data Export PHPExcel module is not available for D8/9 🙁
Thanks for reading and thanks in advance for your help !