The following patch adds a configurable delimiter to the action "Pass ids as arguments to a page (views_bulk_operations_argument_selector_action)".

For security I have limited the options to a select list of a comma (,) and plus (+) for use with the views contextual filters (AND / OR respectively). I chose to make it a select list for security, but it could easily be extended with more delimiters or a text field for any value.

Please review, thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

elBradford’s picture

sethfisher’s picture

Here's a very similar approach I implemented (without having seen this post). It uses a text field allowing for any character to be used as a separator, and it uses the term separator rather than delimiter. The default is a comma.

VBO Pass IDs Separator

kenorb’s picture

I can't test the patch, as when I'm exporting, I'm redirected to the following URL:
/my_view/export/11219%2C11222
This happens with and without patch, it seems that something is not encoded correctly.
Any clues?

gkaas’s picture

Issue summary: View changes

@kenorb you might have to change the contextual filters of your export view and validate the ids seperated by , or +. This probably fixes your encoding issue...

pebosi’s picture

Patch is still working fine and applies nicely.

pebosi’s picture

Status: Needs review » Reviewed & tested by the community
Chris Matthews’s picture