On a clean new install of Drupal7, I am trying to use Simplenews
(7.x-1.x-dev tar.gz (79.42 KB) | zip (95.51 KB) 2011-Jan-23)
but I am always encountering this error:
"A newsletter category term is required"

I followed all the steps in README.txt file but... no chance.

Hmmm... Wish I could get this great mod running...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anticosti’s picture

I can use Simplenews now.
I had to comment out line 401 to 411 (file: simplenews/simplenews.module) :

401 // else {
402 // Check if a newsletter category term is selected.
403 //$terms = simplenews_get_term_values($node);
404 //if (!$terms) {
405 //form_set_error($field['field_name'], t('A newsletter category term is required.'));
406 //watchdog('simplenews', '@todo ... newsletter taxonomy is required, change settings.', array(), WATCHDOG_ERROR);
407 //}
408 //elseif (count($terms) > 1) {
409 //form_set_error($field['field_name'], t('Only one newsletter category term is allowed.'));
410 //watchdog('simplenews', '@todo ... newsletter taxonomy must be single value, change settings.', array(), WATCHDOG_ERROR);
411 //}

mordonez’s picture

Title: [X] A newsletter category term is required. » A newsletter category term is required.
Component: Usability » Code
Status: Active » Needs work

Same issue here. Registering to the queue

olax’s picture

Same problem here.

mordonez’s picture

Priority: Normal » Major

priority change to major. It's not posible create newsletter content

eheuvel’s picture

Same here, fresh Drupal 7 install

sw3b’s picture

Same for me ! And #1 did the trick !

Simon Georges’s picture

@all, do you have a taxonomy associated to Simplenews ? Does this taxonomy have terms in it ?

(on a fresh install of Simplenews, everything was working fine for me).

mordonez’s picture

I attach a possible patch

Anticosti’s picture

@ Simon Georges (#7)

In my case I had previuosly installed Forum before Simplenews.

Before installing Simplenews I had these taxonomy categories:

Taxonomy
-- Forums
-- Tags

After Simplenews:

Taxonomy
-- Forums
-- Simplenews
-- Tags

Simon Georges’s picture

If I understand correctly the patch in #8, it would be multi-language related ?

@Anticosti, is there a term in Simplenews category ?

sw3b’s picture

#10 make sense. I'm on multi language. French by default.

#7 @Simon, yes I have a taxonomy assign. I always look the settings and save them before testing new module. It was a brand new setup !

Simon Georges’s picture

Great, at least, we're going forward, I will try to reproduce it on a multi-language setup ;)

clauded’s picture

Applied patch #8 on multilanguage site and it worked for me.

Simon Georges’s picture

Title: A newsletter category term is required. » Can't change the language of a node : "A newsletter category term is required"

Actually, the problem persists if you try to change the language of your content (because the language of the submitted node won't match the language of the term (which will be the old language of the node).

czigor’s picture

#8 worked for me on a Hungarian site. Thanks! I suppose it will not work for more complicated cases though.

LeDucDuBleuet’s picture

I'm on multi language. French by default as well.

Patch in #8 made it all work!

Thx mordonez!
:-)

Simon Georges’s picture

Status: Needs work » Needs review
FileSize
613 bytes

Ok, new patch that did seems to work for me, both to fix the message & to still allow changing the language of the node.

Can somebody test it so I can be sure it's the good way to go and commit it ?

czigor’s picture

#17 works for me.

Simon Georges’s picture

Ok, thanks for your quick feedback, I'll wait for another positive answer, and then commit it asap (it's about time ;)).

Simon Georges’s picture

Status: Needs review » Fixed

Patch in #17 committed. This should be available in the next 7.x-1.x-dev (within the next 12 hours).

Please reopen is you still have issues.

Status: Fixed » Closed (fixed)

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