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.
Solution should be scalable, so we need to do it via cron or advanced-queue module.
Comment | File | Size | Author |
---|---|---|---|
#18 | 1862702-og-queue-18.patch | 13.04 KB | RoySegall |
#16 | 1862702-og-queue-16.patch | 12.88 KB | RoySegall |
#12 | 1862702-og-queue-12.patch | 7.02 KB | RoySegall |
#9 | 1862702-og-queue-9.patch | 10.25 KB | RoySegall |
#6 | 1862702-og-queue-6.patch | 10.16 KB | RoySegall |
Issue fork og-1862702
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
Comment #1
amitaibuCode in branch
1862702
Comment #2
amitaibuUploading for testbot -- needs tests
Comment #3
amitaibuPatch allows also to move orphan group-content to another group.
Comment #4
amitaibuAdded UI
Comment #5
amitaibuCorrect patch...
Comment #6
RoySegall CreditAttribution: RoySegall commentedAdded test for the deleting orphan and fix a bug: content which relate to more then one groups is getting deleted.
Comment #8
amitaibuAdd comment why we do this.
Add
'dependencies' => array('advancedqueue');
Add PHPdocs.
Use $this->drupalCreateNode().
Don't use the wrapper. Use og_group() instead.
"Execute manually the queue worker."
$this->assert($first_node, 'Non-orphan group content not deleted.');
Comment #9
RoySegall CreditAttribution: RoySegall commentedI run the tests at my local drupal and it's work ok.
Applied fixes.
Comment #10
RoySegall CreditAttribution: RoySegall commentedChange status.
Comment #12
RoySegall CreditAttribution: RoySegall commentedI returned the dependencies for the getInfo().
Comment #13
amitaibuGreat. Next test is the "move" feature.
You will need to set the orphan property via
hook_entity_delete()
in og_test_moduleComment #14
amitaibuCommitted, thanks.
Comment #15
amitaibuTest is missing from tets, reverted commit.
Comment #16
RoySegall CreditAttribution: RoySegall commentedI added the missing test and worked on the test for moving the nodes to another group.
Comment #17
amitaibu=> to first group
Add docs.
Comment #18
RoySegall CreditAttribution: RoySegall commentedComment #19
amitaibuCommitted, thanks.
Comment #20
el1_1el CreditAttribution: el1_1el commentedThanks all, this seems to work great!
One thing that I'm not personally quite sure how to fix without a SQL statement is that it seems that when I delete groups, the "og_membership" table doesn't seem to get updated and I get a blank entries in Views when using the "OG membership: Group Node from OG membership" relationship for users. It's not difficult to hide them, but I wanted to throw it out there.
Thanks again