Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Allow users to assign a node to more than one section. This should really be part of the API, and select multiple should be optional. This patch is a start.
Comment | File | Size | Author |
---|---|---|---|
#14 | 1089494.multiselect.patch | 17.18 KB | agentrickard |
#11 | 1089494.multiselect.patch | 17.18 KB | agentrickard |
#10 | 1089494.multiselect.patch | 17.06 KB | agentrickard |
#9 | 1089494.multiselect.patch | 13.95 KB | agentrickard |
#8 | 1089494.multiselect.patch | 13.69 KB | agentrickard |
Comments
Comment #1
agentrickardAnd the patch.
Comment #2
agentrickardAnd a patch that works (against 7.x-1.x branch).
Comment #3
agentrickardWorks, but makes the View return multiple instances of the same node. Slightly updated patch.
Comment #4
agentrickardNew patch. This kills field-based sorting. Still needs work on the filter query.
Comment #5
agentrickardUpdated patch to latest head.
Comment #6
agentrickardFixes error in hook_node_load().
Needs a test.
Can we sort this column Views?
Comment #7
agentrickardPatch that fixes the filter. Still cannot sort, but that's ok.
Needs tests.
Comment #8
agentrickardAnd.... sorting restored. Still needs a test.
Comment #9
agentrickardAnd this version fixed the README.
Comment #10
agentrickardAnd the patch with a very simple test.
Comment #11
agentrickardUpdated patch to latest HEAD.
Comment #12
ultimikeAt first glance, when adding/editing content, everything appears to be working well (I haven't done anything too complicated, though).
I did run into an error when trying to assign a editor to a section. Here's what I did:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5-8-taxonomy' for key 1: INSERT INTO {workbench_access_user} (uid, access_id, access_scheme) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 5 [:db_insert_placeholder_1] => 8 [:db_insert_placeholder_2] => taxonomy ) in drupal_write_record() (line 6776 of /Users/michael/Sites/vcs/includes/common.inc).
I then tried truncating the "workbench_access_user" table and retried steps 2 and 3 from above. After I clicked the "update editors" button, I didn't receive an error, but the user wasn't listed as an editor either (although there was a new record in the "workbench_access_user" table. I then tried to repeat steps 2 and 3 again (without truncating the table), and received the same error as in step 4 above.
Thanks,
-mike
UPDATE - I did some more research and now do not think this is an issue with this patch - I had permissions incorrectly set and was trying to add a user that didn't have a role with the "Allow all members of this role to be assigned to Workbench Access sections" permission.
Comment #13
agentrickardI think that error was just addressed by #1194530: Attempting to add the same user to a section produces an error.
Comment #14
agentrickardOne more update. Committing.
Comment #15
jgerbracht CreditAttribution: jgerbracht commentedThanks for adding multiselect, this will be key for the workflow I need to implement.
However, I've loaded the latest patch from June 23, and I'm getting multiple rows for the same content in My Workbench / My Content. A row for each section I've assigned the content to.
Thanks,
Jeff
Comment #16
agentrickardPlease don't comment on Fixed issues.
You should upgrade to 7.x.2.6, which has this fix in it, and possibly other necessary changes. I certainly don't have that problem.
If the problem persists after upgrading (and clearing Views cache), please file a new issue with details.