I have created a content type with name Newsletter issue which has simplenews as its type
I added a Newsletter taxonomy and applied it to the Newsletter issue
I configured simplenews to read from Newsletter taxonomy

I can Send one test newsletter to the test address. This works fine.

When I try to send newsletter I get this error:
You should assign content type simplenews to the Newsletter vocabulary before you can send this newsletter

I found mention of this error but I don't think that the patch applies (http://drupal.org/node/275491)

Comments

sutharsan’s picture

That patch is already included. You could try to re-save the site configuration > simplenews > general settings.

sutharsan’s picture

Status: Active » Postponed (maintainer needs more info)

Did the above suggestion solve the error?
Do you use free tagging vocabulary or the standard select list?
Do you use any module that alters the vocabulary (e.g. Category module)?

hobo’s picture

No.. im seeing this error again. I tried from a fresh install last time and got it to work.. I'm running into the same problem again on another site. This one i can't re-build.

Using standard select list..
no category module

In taxonomy i see newsletters taxonomy assigned to Newsletter type
When I create a Newsletter I see the newsletters select list. (with a newsletter selected)

I can send a test email, but when i try to send i get this!
You should assign content type newsletter to the Newsletter vocabulary before you can send this newsletter.

sutharsan’s picture

Use the latest 6.x-1.x-dev release, go to example.com/admin/settings/simplenews/general check and save the settings. That should clear the error. If not, you need to debug the code.

hobo’s picture

I ended up getting some help. I put in a 'hack' that solved the problem
in simplenews.module

/**
* Implementation of hook_nodeapi().
*/
function simplenews_nodeapi(&$node, $op, $teaser, $page) {
global $user;

case 'validate':

if (!isset($node->taxonomy)) {
$test_node = node_load($node->nid);
if (isset($test_node->taxonomy)) {
$node->taxonomy = $test_node->taxonomy;
}else{
//print 'taxonomy error';
//exit;
}
}

What i found was happening is that node->taxonomy did not exist at that point. but if you load up the node again it was there.?

iaminawe’s picture

I have a similar problem...
I have two content types I would like to send out , a newsletter content type and a press release content type

Under general settings I have associated the two types with simplenews and I have a newsletter vocabulary set up and populated

If I create a new newsletter and send it to one of the lists from the vocabulary dropdown it works fine as a test and to a full list

If I create (or edit) a press release, I can send a test and receive it fine but as soon as I select a full newsletter list to send it to from the newslettter vocabulary dropdown and try to send it seems to forget my selection and gives me this error message

You should select a newsletter term before you can send this newsletter issue

I am not using category or free tagging and I have tried saving the settings again from the general settings page but still no luck.

I tried applying the Hobos hack but ended up with a plain white screen. Does this hack need to be applied over anything or just added to the end of the simplenews.module?

Any help would be greatly appreciated.

Thanks
Gregg

sutharsan’s picture

@hobo: Your code assumes that the $node->taxonomy gets lost between load (the initial not the one from node_load()) and validation. can you confirm this with your observations?
What modules do you use that depend on taxonomy?

@gregg: do you use 6.x-1.0-rc4 (the verison tag of this issue) or 6.x-1.x-dev?

iaminawe’s picture

Sorry should have specified...
Using the 6.x-1.x-dev

Feel free to send me code to try and debug for you
I guess I should also mention that I use content taxonomy module as well on the Press Release content type

Thanks
Gregg

sutharsan’s picture

Version: 6.x-1.0-rc4 » 6.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active

changed version and status accordingly .
(@all: be bold, change version, status, etc. when applicable)

blooom’s picture

Seems the module "node form rearrange" (http://drupal.org/project/node_form_rearrange) is causing this error.

Just deactivated it, the error disapperead, and newsletters are beeing sent.

iaminawe’s picture

I am not using form re-arrange.

sutharsan’s picture

Status: Active » Closed (won't fix)

I've tested further with content taxonomy and came to the conclusion that Simplenews is not compatible with Content Taxonomy when Content Taxonomy is used for the newsletter taxonomy term. Content taxonomy takes over the taxonomy values in the node and does not provide a taxonomy value at node validation. Simplenews requires this and can not work without.

aleagi’s picture

Hi,

I CAN confirm, node_form_rearrange was causing me the problem.

Is there any way to fix it?

TIA!
Aleagi
.

socialnicheguru’s picture

#!2 is this still the case if you set content taxonomy is copied to taxonomy table for the content taxonomy field created?

xarbot’s picture

Suscribed

thekayra’s picture

subscribing

ClearXS’s picture

Status: Closed (won't fix) » Needs review

There was a question after changing to "no-fix" for a possible way to bypass this problem?

I get the impression that simplenews can't be changed that easy towards the problem:

Content taxonomy takes over the taxonomy values in the node and does not provide a taxonomy value at node validation. Simplenews requires this and can not work without.

But does that imply that its more an issue for "content taxonomy" and can be fixed there? Has it been filed there?

Or has it been fixed there, as this issue is quite old?

simon georges’s picture

Status: Needs review » Closed (won't fix)

At this point, this issue is going to be marked as won't fix.
It seems to be a Content Taxonomy issue, so don't hesitate to raise it here if you still have the problem (it may be related to #368918: Keep core taxonomy & CCK taxonomy synced ).

kamranrafi’s picture

Priority: Normal » Major

I used this module and when I selected my vocabulary which already had terms in it, simplenews created newsletters for each term of taxonomy.

I removed one of the the parent term, what simplenews did, it removed that parent term as well as all the terms under that parent term from vocabulary. It destroyed my whole taxonomy.

Any solution?

miro_dietiker’s picture

kamranrafi
I don't think it's simplenews that does this child traversing. Isn't this a drupal core feature?
Delete a Parent = Delete childs

What else do you expect?!
Note: This issue is closed!