Hi, My newsletter is set for running daily, but it sends with every cron. How can I schedule it so that it only sends once a day?

Comments

Tran’s picture

Category: support » bug
Priority: Normal » Major
drudev12’s picture

Hi,

i have the same problem. my newsletter is set for running manually, but it also sends with every crown...this lead me into trouble with my customers...so we need to fix this as soon as possible.

i am also a developer, so i can figure out the problem maybe by myself, but atm i just haven´t enough time.

A hint, where to start, by the main developer would be great!?

Also i found some more bugs, for example if you like to send an FULLHtml Newsletter Template with the letter "ß" oder   in the source code, there will be a PDO Exeption. The Newsletter will be send anyway but because of the PDO Exeption no Statistic Entry will be shown...and so on....

I could reproduce this error many times in different ways, just by creating a custom template and not sending any default templates etc..

I also want to know how active is the development process?!!??
Is there a roadmap or something like that with the next release date?!

Please give us some informations, ill try to help with the development as far as i can!

ParisLiakos’s picture

I have not much time either for documentation or time to check bugs and support requests etc.
A starting point would be checking newsletter_cron...but then you will have the newsletter mail classes

Any help or patch is appreciated

drudev12’s picture

Status: Active » Needs review

Hey!

I pointet down the issue...but i dont really know how to fix ist because i dont understand whats going on there, but i think for you it shouldnt be a big problem.

Could you please have a quick look at the following position:

src: newsletter.custom.inc
at 96 to 98 it says:

if (empty($subscribers_left) && isset($message)) {
module_invoke_all('newsletter_list_sent', $message);
}

and thats where the exception happens (if i run a cron and look at the activity export afterwards):

PDOException: in field_sql_storage_field_storage_write()...

What does "module_invoke_all" do?

Also have a look at the bottom off this site:
http://api.drupal.org/api/drupal/includes!module.inc/function/module_inv...

There it says "Unfortunately this function and module_invoke() do not allow passing variables by reference"...could this be the issue?!

Please fix it or tell me how to do a workaround, to get rid of this exception...(i think commenting ro 96-98 out couldnt be really a solution)..sorry 4 my bad englisch :)

ParisLiakos’s picture

module_invoke_all fires a hook..is there a module that implements hook_newsletter_list_sent()?

drudev12’s picture

Hello,

no there is no other module that implements this hook (hook_newsletter_list_sent()). i researched the whole project. The only place where this hook is used is in newsletter.module on line 942...

confusing...

ParisLiakos’s picture

hmm...what version do you use?
if you user beta9 this is here: newsletter_newsletter_list_sent in newsletter.module. this function implements it

Can you give me the full error message?

PDOException: in field_sql_storage_field_storage_write().... then?

drudev12’s picture

Hi,

I use 7.x-1.0-beta9

Here is the Full MSG:

PDOException: in field_sql_storage_field_storage_write() (Zeile 450 von /var/www/web907/html/relaunch/modules/field/modules/field_sql_storage/field_sql_storage.module).

drudev12’s picture

and..by the way, there is another problem i dont really understand.

I did a fresh install, setup some subscribers and a mailing list. i added the list as "manual" send type.
If i send the mailing, and the number of outgoing mails is under the number of subscribers, the first cron run will work, and mails will be send. but on the next cron rund, some mails are still outstanding, so they normally should be send until there are no more mails to send but instead of that i get the following msg :

"1 Newsletter Lists failed to send because no published nodes found for their terms"

Why?
I mean, i set the newsletter send rate to "manual", so i thought every time i klick "send" the whole newsletter will be send to all subscribers, as much cron runs it would even take...but at the moment it does not really work...even one time....

...ok but one thing after the other... ;D

drudev12’s picture

Hm.

I did a re-Install of the Module and cleaned up the database. Since that the errors seems gone.
Sorry for the trouble, but there are some indifferences anyway.

As i found out, there is another bug in "newsletter.mail.inc"

The encoding is not correct on some Mail Clients. I testet the E-Mails in yahoo webmail, google mail and google live mail client.
It seems as this error is happening here:

http://www.php.net/manual/de/function.html-entity-decode.php#89483

So after changing line 39, the return value, from
return html_entity_decode($dom->saveHTML());

to

return utf8_encode(html_entity_decode($dom->saveHTML()));

te encoding is in all clients correct.

Can you confirm that? Maybe this is something you can improve :)

greez

ParisLiakos’s picture

Status: Needs review » Postponed (maintainer needs more info)

see issue here #1508524: non-latin characters appear scrumbled

PDOException: in field_sql_storage_field_storage_write() (Zeile 450 von /var/www/web907/html/relaunch/modules/field/modules/field_sql_storage/field_sql_storage.module).

This is not the full error message, where is the actual exception test?

ParisLiakos’s picture

Version: 7.x-1.0-beta8 » 7.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active

Re-opening due to this:
#1816256: PDOException error