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!

CommentFileSizeAuthor
#4 simplnews-debug.txt31.25 KBtomas.teicher

Comments

simon georges’s picture

Mimemail 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.

simon georges’s picture

Could 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.

simon georges’s picture

Status: Active » Postponed (maintainer needs more info)
tomas.teicher’s picture

StatusFileSize
new31.25 KB

I have the same problem. I am sending debug information of $variables in attachment.

tomas.teicher’s picture

Status: Postponed (maintainer needs more info) » Active

I forgot to change status
Tomas

simon georges’s picture

@tomas.teicher Ok, there's the bad-formed part in the middle:

Array
(
    [element] => Array
        (
            [#title] => Cena od:
            [#value] =>
            [#theme] => simplenews_field
            [#children] =>
        )
    [theme_hook_suggestions] => Array
        (
        )
)

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 ?

tomas.teicher’s picture

"cena od" (in english "Price from") is my node field, but it is not attached to content type I use as newsletter.

miro_dietiker’s picture

tomas.teicher: enable the field in the build mode of simplenews. It's in the tab "display fields" of structure - content type - newsletter issue.

tomas.teicher’s picture

I 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.

berdir’s picture

Status: Active » Fixed

This 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).

Status: Fixed » Closed (fixed)

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