The bulk subscribe/unsubscribe operation that was added to the people page with patch # 1249502 should be available to VBO. This will allow custom people pages to be created with views and VBO.

Comments

salvis’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Active » Needs work

I agree.

Patch?

acrollet’s picture

Status: Needs work » Needs review
StatusFileSize
new3.58 KB

patch attached - works for me, etc. One small caveat - I had to bump the max_allowed_packet size in MySQL to get this to work for views with many thousands of rows. (interaction with storing the information necessary in the session, I'm assuming)

Status: Needs review » Needs work

The last submitted patch, subscriptions-add_bulk_subscribe_to_vbo-1712734-2.patch, failed testing.

salvis’s picture

Status: Needs work » Needs review
salvis’s picture

Any interest in this?

Anonymous’s picture

Yes, please add this feature to the Subscriptions module. I would really like to be able to modify subscriptions in batches of more than 50 at a time. Thanks Salvis!

salvis’s picture

@MadEye4: Good — please check out the patch, install it, test it, and provide feedback on what you find.

Anonymous’s picture

Hi Salvis,

Thanks for the prompt. I was going to write that I don't know how to apply patches. I am not a programmer and GIT and DRUSH are beyond me. Then I decided to figure it out.

I found a page that describes very clearly how to use the Terminal in Mac OSX to apply patches. I looked at the patch, downloaded the two files that needed patching, applied the patch and then uploaded the files.

I tested it with large subscribe and unsubscrite batches, audited a few users to make sure it was working and all seems well.

So far so good. I'll post here if I encounter any issues.

Thanks!

salvis’s picture

Status: Needs review » Needs work

Thank you, MadEye4!

The code does a great job of using what's already there — there's just one documentation issue:

+++ b/subscriptions.module
@@ -982,6 +982,97 @@ function _subscriptions_bulk_operation(array $uids, $bulk_op) {
+/**
+ * Helper function - abstracts the actions necessary to hijack the bulk
+ * subscribe/unsubscribe action form and redirect to the subscriptions bulk
+ * operations form.
+ */

... does not follow the one-line-plus-empty-line convention.

However, I'm encountering some issues in testing:

1. I've created a users view that includes the "Send e-mail" operation, and executing it gives me

Warning: array_unshift() expects parameter 1 to be array, null given in array_unshift()

in subscriptions_views_bulk_operations_form_alter().

2. Selecting two users and executing the "Subscribe the selected users to..." operation gives me

9 users selected for bulk subscribing.

which is all users on my test installation.

I'm using VBO 7.x-3.1, Views 7.x-3.7.


I would really like to be able to modify subscriptions in batches of more than 50 at a time.

You may want to take a look at the Pager Limits module...

johan den hollander’s picture

Issue summary: View changes

I confirm #9 point 2.
It selects all of your first page users. That's 50 in my case.
I have the option to select all 85 users in my view. When I do that I can subscribe all 85.
It is not possible for me to select only a handfull of users. Its all or nothing.

Also I can only choose to subscribe users. Not unsubscribe.

Drupal 7.56 / Subscriptions 7.x-1.3+0-dev / VBO 7.x-1.3+0-dev

pattersonc’s picture

Updated patch to recognize the selected rows in the view. There still seems to be an issue with Select All across multiple pages. I did not look into this issue.

salvis’s picture

Thank you, pattersonc, for working on this!

Anyone willing to take on the Select All issue?