The file scheme for the generated export file is hardcoded, which isn't great if those schemes don't work for your use case. Goes without saying that this shouldn't really be hardcoded.

Issue fork vbo_export-2988257

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kalpaitch created an issue. See original summary.

kalpaitch’s picture

Title: Allow output file scheme to be choosen » Allow output file scheme to be chosen
kalpaitch’s picture

Status: Active » Needs review
StatusFileSize
new5.66 KB
graber’s picture

Status: Needs review » Needs work

Hi @kalpaitch, thanks for your work, it'll be good to have an option to select the file scheme.

Review: you don't need to create a dedicated route and form, it'll be much better to use VBO API for preliminary configuration: see https://www.drupal.org/docs/8/modules/views-bulk-operations-vbo/configur...

kalpaitch’s picture

StatusFileSize
new2.22 KB

Ace, yes that sounds like a much better idea.

kalpaitch’s picture

Status: Needs work » Needs review
graber’s picture

StatusFileSize
new4.22 KB
new3.1 KB

I improved a few bits and implemented short array syntax, but it's still not perfect, setting the file scheme different than public results in unexpected behaviour (temporary - filename is always temporary.csv, private - WSOD, maybe with this module https://www.drupal.org/project/private_files_download_permission it'd work, no time to find out though).

graber’s picture

Status: Needs review » Needs work
jacobbell84’s picture

Rerolling for 3.1

graber’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev

Thanks @jacobbell84, does this work for you? I got an error when testing last time on local but maybe it was a problem with my private file system..

jacobbell84’s picture

Hi @graber, it does though I'm using the temporary folder and not the private system.

jacobbell84’s picture

kalpaitch’s picture

kalpaitch’s picture

StatusFileSize
new2.25 KB

I've re-rolled this patch for 8.x-3.x.

I think it's important to use the same default file scheme selection mechanism as core... but not the default_scheme selection itself (as selected in the system.file config). My reasoning is that for backwards compatibility this module currently defaults to the private scheme if available or else the public scheme. Changing the default to whatever is selected in system.file config seems like a jump to far for a minor update, and also not directly necessary for the purposes of this issue, all that is needed is for the user to be able to change the vbo_export scheme, not to change the default value.

kalpaitch’s picture

Status: Needs work » Needs review

kalpaitch’s picture

StatusFileSize
new32.12 KB

Re-rolling.

kalpaitch’s picture

StatusFileSize
new1.8 KB

Re-rolling patch, correction.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

We've been using this patch for a while. I think it looks good to go, but not sure about tests? I'm going to rtbc this - but I'm not sure about the test-expectations for this.

graber’s picture

@borisson_, don't we need config schema for this new setting?

borisson_’s picture

Status: Reviewed & tested by the community » Needs work

Good question, I think we do.

graber’s picture

astonvictor’s picture

Version: 8.x-3.x-dev » 4.x-dev

astonvictor changed the visibility of the branch 8.x-2.x to hidden.

astonvictor changed the visibility of the branch 2988257-allow-output-file to hidden.

astonvictor’s picture

Status: Needs work » Needs review

Hi there,

I updated the schema configs and prepared another MR for 4.x branch.
thanks

astonvictor’s picture

Version: 4.x-dev » 4.2.x-dev
Status: Needs review » Fixed

fixed in a new 4.2.x branch
thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

thulenb’s picture

I get an error when updaten to 4.2.x

The specified value private in the File Scheme element is not allowed.

In my Drupal file schema setting I have no path set for the private file system. Am I now required to use it?

In the VBO export field setting it's doesn't make a difference what file schema I select, I always get the above error when trying to save.