Getting An Error When I Try To Create A Newsletter

I'm getting the following Notice/Warnings when I try to create a newsletter.

Notice: Trying to get property of non-object in /plugins/e-newsletter/email-newsletter-files/builder/class.builder.php on line 21

Notice: Trying to get property of non-object in /plugins/e-newsletter/email-newsletter-files/builder/class.builder.php on line 22

Warning: Cannot modify header information - headers already sent by (output started at /e-newsletter/email-newsletter-files/builder/class.builder.php:21) in /public_html/wp-includes/pluggable.php on line 1174

I uninstalled eNewsletter, deleted all the enewsletter tables in phpmyadmin and reinstalled but I'm still getting these notifications. Please help me get rid of them.

Support Access is granted.
Thank you.

  • Kasia Swiderska

    Hello Mary,

    I tested e-Newsletter on my lab Multisite and I could not replicate this issue you are having.
    Could you please check your wp-config.php file if you have line there

    define('WP_DEBUG', true);

    if yes, can you add after it

    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    this will stop showing notices on front end and will start to log all this information to debug.log file.
    When debug outputs errors like that even harmless notice can break things because it will show up in wrong place.
    When you log those to debug.log file they won't show up and break things.
    Let me know if this worked on your site,

    kind regards,
    Kasia

  • Mary

    Thank you Kasia. I want to be aware of the errors as I go along. Please note also that I have an error at the top of the page when I'm creating the newsletter.

    Notice: WP_Customize_Manager::remove_panel was called incorrectly. Removing widgets manually will cause PHP warnings. Use the customize_loaded_components filter instead. Please see Debugging in WordPress for more information. (This message was added in version 4.5.0.) in /home/mary/public_html/wp-includes/functions.php on line 3996

  • Mary

    I have just deleted a Newsletter and got the same errors.

    Notice: Trying to get property of non-object in /home/mary/public_html/mary-content/plugins/e-newsletter/email-newsletter-files/builder/class.builder.php on line 21

    Notice: Trying to get property of non-object in /home/mary/public_html/mary-content/plugins/e-newsletter/email-newsletter-files/builder/class.builder.php on line 22

    Warning: Cannot modify header information - headers already sent by (output started at /home/mary/public_html/mary-content/plugins/e-newsletter/email-newsletter-files/builder/class.builder.php:21) in /home/mary/public_html/wp-includes/pluggable.php on line 1174

    See Screenshot.

  • Mary

    OK this is getting really frustrating. I have a newsletter to go out and it won't send. I just keep getting the errors. I refresh the page and try again but no luck.

    Please feel free to login to my site and send the #2 Newsletter called "New Site Is Up And Ready To Go".

    It needs to be sent to 127 "All Members".

    Perhaps you will be able to figure it out if you work directly on my site instead of trying to recreate it on yours.
    Thank you.

  • Ash

    Hello Mary

    As it is generating some notices, so the ajax request fails because the result doesn't receive correct result but result with notice.

    I want to be aware of the errors as I go along.

    That's good thing, though it's not a good idea to keep debug mode enabled in live site. Because, when the error is printed, you may notice that the error contains your server username - in your case it is "mary". It's always good idea to hide error log from outside world so hackers or bad people can't harm at all.

    Though if you still want to keep debug mode on, let's do it in another way. In your wp-config.php, replace the following line:

    define( 'WP_DEBUG', true );

    with

    define( 'WP_DEBUG', isset( $_REQUEST['wp-debug'] ) && $_REQUEST['wp-debug'] == 1 );

    Now if your site url is http://domain.com, and when you visit http://domain.com/?wp-debug=1 then you will see the error. That means, just adding "?wp-debug=1" will show the error, otherwise not.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Rupok

    Hi Mary,

    As Ash suggested above, can you please login to your server with any FTP application like FileZilla, then go to the root folder of your site, then open your "wp-config.php" file and search for this line:
    define( 'WP_DEBUG', true );
    And replace it with the following:
    define( 'WP_DEBUG', isset( $_REQUEST['wp-debug'] ) && $_REQUEST['wp-debug'] == 1 );
    I believe this will resolve your issue.

    If you find it tough to do, can you send me a message with access credentials through our secure contact form here: https://premium.wpmudev.org/contact/ so we can do this on behalf of you?

    Subject: "Attn: Rupok"
    - FTP Username
    - FTP Password
    - FTP Host
    - Link back to this thread for reference
    - Any other relevant URLs

    Select "I have a different question" for your topic. This and the subject line ensure that it gets assigned to me.

    I'm looking forward to hearing from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.