Newsletter Builder - PHP Warnings?

By Djulia - August 29, 2012 - edited: August 29, 2012

Hi Dave,

> Enter test emails, one email per line.
There seems to be a problem with the Test E-mails field.

"There are no valid emails in 'Test Emails'"

No error message if one uses a comma as separator.

email@domain.com,email2@domain.com,..

Also on cronjob:

Fatal error: Call to undefined function pluginAction_addHandlerAndLink() in htmlFormBuilder.php on line 21

Thanks!

Djulia

Re: [Djulia] Newsletter Builder v1.00 Released!

By Dave - August 29, 2012

Hi Djulia,

It doesn't support comma as a separator as it could occur in the "display name" portion (only the address is parsed and used), eg:
"Smith, John" <john.smith@example.org>.

Try one per line like this:
email@domain.com
email2@domain.com

Or just replace , with nextline (\n) in your text editor. Also, how many addresses are you importing?

>Fatal error: Call to undefined function pluginAction_addHandlerAndLink() in htmlFormBuilder.php on line 21

That is your plugin correct? That function should be define in /lib/plugin_functions.php since 2.15. Can you look into that and see if you can find any more details?

In a future release I'm going to add a header line so you can tell plugins whether they should load when the scripts run from the command-line or cron.

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Newsletter Builder v1.00 Released!

By Djulia - August 29, 2012 - edited: August 29, 2012

>Fatal error: Call
Oops! I made an error with the file which must be used for cron! :-D

But, still not succeeded in adding two emails in the field of test (Capture1.gif).

Thanks!

DJulia
Attachments:

capture1_012.gif 6K

Re: [Dave] Newsletter Builder v1.00 Released!

By Djulia - August 29, 2012

My logs cron give me an error:

PHP Notice: Undefined index: SCRIPT_NAME in lib/plugin_functions.php on line 302

- I added email for the tests (in Message for Send to test list..) , but I do not receive the email.

- I also have another error message if I select : Send to full list - you can only do this once.

MySQL Error: Unknown column 'customData' in 'field list'
(at newsletterBuilder.php line 161 in function _nlb_createMessage_mailMerge)

An idea?

Thanks for your patience!

Djulia

Re: [Djulia] Newsletter Builder v1.00 Released!

By Dave - August 29, 2012

Hi Djulia,

Are you still running the 2.16 beta? If so can you upgrade to the release version and click on "Section Editors" (this automatically checks the schemas and will add the new customData field.

>PHP Notice: Undefined index: SCRIPT_NAME in lib/plugin_functions.php on line 302

Do you know which plugin is causing this? Try adding the code in red:

$pluginUrl = str_replace(' ', '%20', @$_SERVER['SCRIPT_NAME']); // url encoded spaces

Let me know if this works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Djulia] Newsletter Builder v1.00 Released!

By Dave - August 29, 2012

>But, still not succeeded in adding two emails in the field of test (Capture1.gif).

Is there any whitespace before or after the emails? Such as " mel@domain.com "?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Newsletter Builder v1.00 Released!

By Djulia - August 29, 2012

>Do you know which plugin is causing this?

I deactivated all the plugins.

With background-mailer.php activated only, there are 3 lines of notice.

The others plugins of iTool is
- CSV Import = 1 notice
- Website Comments = 1 notice

...and two plugins that we created.

If you find the reason, can you communicate the solution so that we can correct if it is necessary?

Thanks!

Djulia

Re: [Djulia] Newsletter Builder v1.00 Released!

By Dave - August 29, 2012

Hi Djulia,

I added the above code patch to plugin_functions.php and this line to lib/init.php

// Fix SCRIPT_NAME and PHP_ SELF (often set incorrectly when PHP is in CGI mode)
$isCgiMode = PHP_SAPI == 'cgi' || PHP_SAPI == 'cgi-fcgi';
// v2.17 Make sure SCRIPT_NAME key is always set, so command-line and cronjob scripts show undefined errors
$_SERVER['SCRIPT_NAME'] = @$_SERVER['SCRIPT_NAME'];


I think those two fixes should prevent further warnings from PHP. We're going to be adding more features to make cronjobs and scheduled processes easier in the coming releases as well.

Let me know if you run into any other problems. Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Djulia] Newsletter Builder v1.00 Released!

By Dave - August 31, 2012

Hi Djulia,

>But, still not succeeded in adding two emails in the field of test (Capture1.gif).

I think this may be caused by IE8 adding extra return (\r) chars or whitespace. I've updated the parsing code to split on any whitespace so hopefully that should fix it in the next minor release.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com