Posted by magpie5212 on September 16, 2009 at 10:11am
Jump to:
| Project: | Views Mail |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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.
| Attachment | Size |
|---|---|
| views_mail.module.txt | 83 KB |
Comments
#1
Hi,
Did you find other things? Looking into this module also.
greetings,
Martijn
#2
Seems to be working OK after my fix.
#3
According to your fix, is this what line 128 should have?
<?php$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");
?>
#4
If your tables start with a prefix the #3 doesn't fix the problem.
The { and } must be there
It should be this:
<?php$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");
?>
#5
The same thing applies to lines 1126 and 1129