Scenario: when creating a vocabulary and attach it to a group content, the terms of the vocabulary are referenced to the group content and we can see them on the node page. That's ok, the problem happening after removing the vocabulary from the bundle(i.e un-checking the bundle check box in the vocabulary edit page).

After some discussion in the issue we got the next solution: when removing the vocabulary from the group content we need to go over the terms that belong to the vocabulary and remove their reference from the content that belong to that group. All of this need to be done using the batch API.

Comments

roysegall’s picture

Status: Active » Needs review
StatusFileSize
new9.29 KB
roysegall’s picture

I added a comment on the test.

amitaibu’s picture

Assigned: Unassigned » amitaibu

We are now taking a different approach using the Advanced-Queue module. Work is done in 1906672 branch.

amitaibu’s picture

StatusFileSize
new9.23 KB

Haven't worked on the test yet, but the advanced-queue code seems to be working :)

roysegall’s picture

StatusFileSize
new9.12 KB

The test of the advance queue is checking the delete of the OG vocabulary via the API ant not through UI.

amitaibu’s picture

Status: Needs review » Needs work

Looks good:

+++ b/og_vocab.testundefined
@@ -478,3 +478,115 @@ class OgVocabApiTestCase extends DrupalWebTestCase {
+    // Create two groups type.
+    $this->setUpGroupContent('first');
+    $this->setUpGroupContent('second');

No need for the helper function. write the explicit code.

+++ b/og_vocab.testundefined
@@ -478,3 +478,115 @@ class OgVocabApiTestCase extends DrupalWebTestCase {
+      $this->assertTrue(!empty($node->{OG_VOCAB_FIELD}), 'Terms are attached to the node ' . $groups_content->title . '.');

Use format_string()

roysegall’s picture

StatusFileSize
new9.36 KB
amitaibu’s picture

Status: Needs work » Needs review
amitaibu’s picture

Status: Needs review » Needs work
+++ b/og_vocab.testundefined
@@ -478,3 +478,116 @@ class OgVocabApiTestCase extends DrupalWebTestCase {
+  private $first;

Better names.

+++ b/og_vocab.testundefined
@@ -478,3 +478,116 @@ class OgVocabApiTestCase extends DrupalWebTestCase {
+   * When a vocabulary is related to a bundle and his term are reference to the

his => its
him => it

+++ b/og_vocab.testundefined
@@ -478,3 +478,116 @@ class OgVocabApiTestCase extends DrupalWebTestCase {
+    // Creating the vocabulary.

=> Create

amitaibu’s picture

Assigned: amitaibu » roysegall

Please fix #9 and commit.

roysegall’s picture

Status: Needs work » Closed (fixed)

Apply fixes and committed.

amitaibu’s picture

Status: Closed (fixed) » Fixed

Setting to correct status.

Status: Fixed » Closed (fixed)

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