If the installation is using a prefix for the database then the module fails to get the default newsletter series.

Line 128 is missing lots of {} and uses the un-prefixed name. The atteached file has the fixes on line 128. I have not checked the rest of the code and am about to start testing.

CommentFileSizeAuthor
views_mail.module.txt83 KBmagpie5212

Comments

summit’s picture

Hi,
Did you find other things? Looking into this module also.
greetings,
Martijn

magpie5212’s picture

Seems to be working OK after my fix.

somebodysysop’s picture

According to your fix, is this what line 128 should have?

  $res = db_query("SELECT term_data.tid,term_data.name FROM {term_data} INNER JOIN {vocabulary} ON term_data.vid = vocabulary.vid WHERE vocabulary.module = 'simplenews' ORDER BY term_data.name");
uv516’s picture

If your tables start with a prefix the #3 doesn't fix the problem.

The { and } must be there

It should be this:

  $res = db_query("SELECT {term_data}.tid,{term_data}.name FROM {term_data} INNER JOIN {vocabulary} ON {term_data}.vid = {vocabulary}.vid WHERE {vocabulary}.module = 'simplenews' ORDER BY {term_data}.name");
richardtmorgan’s picture

The same thing applies to lines 1126 and 1129