Closed (fixed)
Project:
Simplenews Template
Version:
6.x-1.0-beta3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jan 2010 at 16:57 UTC
Updated:
14 Jul 2010 at 12:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
Wuekkie commentedcall to undefined function on line 106 dsm($tid)
Comment #2
Wuekkie commentedTried patching manually in my first post. Later tried patch.exe and got "Hunk #1 failed at 100" here is the reject file from patch.exe:
Comment #3
adam_b commentedsubscribing... any news re this?
Comment #4
Mac Clemmens commentedTry changing dsm to drupal_set_message() and that should resolve the issue. dsm() is a function available through the devel module, which fails if not enabled. You can probably also just delete that line.
--- simplenews_template.module.orig 2010-01-12 16:43:35.000000000 +0000
+++ simplenews_template.module 2010-01-12 16:50:25.000000000 +0000
@@ -100,12 +100,11 @@
*/
function _simplenews_template_mail_alter_simplenews_node(&$message) {
// Setup newsletter data
- $tid = reset($message['params']['context']['account']->tids);
- if (!empty($message['params']['context']['account']->tids)) {
- $tid = reset($message['params']['context']['account']->tids);
- } else {
$tid = $message['params']['context']['newsletter']->tid;
+ if (!$tid) {
+ $tid = reset($message['params']['context']['account']->tids);
}
$newsletter = taxonomy_get_term($tid);
$node = $message['params']['context']['node'];
$content = $message['body']['body'];
Comment #5
ikeigenwijs commentedsubscribe to
Comment #6
ikeigenwijs commentedpatch of nr 4 seemed to work.
i did not do this: Try changing dsm to drupal_set_message() and that should resolve the issue. dsm() is a function available through the devel module, which fails if not enabled. You can probably also just delete that line.
Experiencing problems with images in the head and footer, not displaying referenced as :
cid:cc512de8bb1bbd868a16bdf60922accf@www.revaki.ugent.be
on the image front the
extra dsm($tid);
made no difference
Comment #7
franzThe code changed up to now, please check if there is need to reroll the patch and reopen the issue if it's still active
Comment #9
lavamind commentedThis bug is still present in latest 6.x-1.x release (May 10 2010). If one email has multiple subscriptions to newsletters using templates, the template from the lowest-tid newsletter is used.
The code from the reporter's patch seems to work. I re-rolled the patch using the latest 6.x-1.x code and without the devel function call.
Comment #10
franzCommited, thanks!