Latest dev of Simplenews.
I am trying to get this to work, as I have SimpleNews in the past and been happy.
I created a new newsletter with the subject: "Sample Newsletter" and the body "Another Sample"
But I am having these notices as soon as I send a newsletter to a test email:
* Notice: Undefined index: #label_display in template_preprocess_simplenews_field() (line 2982 of /home/theo2010/public_html/drupal/sites/all/modules/simplenews/simplenews.module).
* Notice: Undefined index: #title in template_preprocess_simplenews_field() (line 2983 of /home/theo2010/public_html/drupal/sites/all/modules/simplenews/simplenews.module).
* Notice: Undefined index: #items in template_preprocess_simplenews_field() (line 2986 of /home/theo2010/public_html/drupal/sites/all/modules/simplenews/simplenews.module).
* Warning: Invalid argument supplied for foreach() in template_preprocess_simplenews_field() (line 2986 of /home/theo2010/public_html/drupal/sites/all/modules/simplenews/simplenews.module).
* Notice: Undefined index: #view_mode in template_preprocess_simplenews_field() (line 2992 of /home/theo2010/public_html/drupal/sites/all/modules/simplenews/simplenews.module).
* Notice: Undefined index: #field_name in template_preprocess_simplenews_field() (line 2996 of /home/theo2010/public_html/drupal/sites/all/modules/simplenews/simplenews.module).
* Notice: Undefined index: #view_mode in template_preprocess_simplenews_field() (line 2997 of /home/theo2010/public_html/drupal/sites/all/modules/simplenews/simplenews.module).
* Notice: Undefined index: #field_name in template_preprocess_simplenews_field() (line 2998 of /home/theo2010/public_html/drupal/sites/all/modules/simplenews/simplenews.module).
* Notice: Undefined index: #view_mode in template_preprocess_simplenews_field() (line 2998 of /home/theo2010/public_html/drupal/sites/all/modules/simplenews/simplenews.module).
Then, the resultant email looks like:
-------- SAMPLE NEWSLETTE
----------------------------------------------------
: : SampleInsider Updates [1]Unsubscribe from this newsletter [2]- - - This
is a test version of the newsletter. - - -
[1] ...snipped../drupal/newsletter/insider-updates
[2] ...snipped../drupal/newsletter/confirm/remove/
I also have MIME mail installed, the newest dev.
I have tried disabling, uninstalling then reenabling to ensure that wasn't the problem.
This is for a client. This is the last piece of the whole website that needs to be completed. Please help!
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | simplnews-debug.txt | 31.25 KB | tomas.teicher |
Comments
Comment #1
simon georges commentedMimemail integration is currently broken in Simplenews 7.x-1.x-dev (see #1048254: Support Mime Mail on Drupal 7).
Regarding the resultant email, you may read about it on #1099188: simplenews_html_to_text() strips off newlines.
I'll check the notices.
Comment #2
simon georges commentedCould you add the line
debug($variables, 'Variables', TRUE);as the first line of the template_preprocess_simplenews_field() function in simplenews.module. It seems your Simplenews field is broken somehow.Comment #3
simon georges commentedComment #4
tomas.teicher commentedI have the same problem. I am sending debug information of $variables in attachment.
Comment #5
tomas.teicher commentedI forgot to change status
Tomas
Comment #6
simon georges commented@tomas.teicher Ok, there's the bad-formed part in the middle:
It seems
theme_simplenews_field()is called on something that is definitely not a Simplenews field. Do you have any idea what "Cena od:" is ? Could you give us any detail about it ?Comment #7
tomas.teicher commented"cena od" (in english "Price from") is my node field, but it is not attached to content type I use as newsletter.
Comment #8
miro_dietikertomas.teicher: enable the field in the build mode of simplenews. It's in the tab "display fields" of structure - content type - newsletter issue.
Comment #9
tomas.teicher commentedI haven't field in this content type. I am creating newsletters with content type Simplenews newsletter. The field "cena od" ("Price from") is existing field but for another content types. In content type Simplenews newsletter I have only two felds: Body and Newsletter category. So the problem is, in my opinion, the system requires value of non existing field and that throws the errors.
Comment #10
berdirThis should be fixed now, was part of #700308: Allow separate theming of each individual outgoing email instead of caching the prepared newsletter.
Please try with the newest dev-snapshot to see if this still happens (you might need to wait until a new snapshot is generated or fetch using git).