• Resolved joel_birch

    (@joel_birch)


    Hello,

    With the WP_DEBUG constant set to true PHP 5.4.26 outputs the following notices about this plugin (v20140923). I think these should be easy to fix and not having those notices would make development much nicer.

    Notice: Undefined index: gap_custom in /Path/to/mysite/wp-content/plugins/ga-google-analytics/ga-google-analytics.php on line 64
    
    Notice: Undefined index: link_attr in /Path/to/mysite/wp-content/plugins/ga-google-analytics/ga-google-analytics.php on line 65
    
    Notice: Undefined index: tracker_object in /Path/to/mysite/wp-content/plugins/ga-google-analytics/ga-google-analytics.php on line 66

    Cheers.

    https://www.ads-software.com/plugins/ga-google-analytics/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Jeff Starr

    (@specialk)

    That happens because the settings are new to this version. Simply click save changes one time and they will stop.

    Thread Starter joel_birch

    (@joel_birch)

    Thanks very much, that worked. Coincidentally, it was also the solution for another plugin with a similar issue, so double thanks!

    Plugin Author Jeff Starr

    (@specialk)

    Glad to help!

    Hello,

    I have the same problem as Joel but the notices remain on mu homepage.

    Jeff you said “That happens because the settings are new to this version. Simply click save changes one time and they will stop. “

    You mean going into ga analytics plugin settings and click on save settings ?

    Thanks for your help.

    Plugin Author Jeff Starr

    (@specialk)

    Yeah give it a try.

    I’ve tried it but it doesn’t solve the problem…

    Plugin Author Jeff Starr

    (@specialk)

    I’m not seeing any errors in the latest version on a default installation of WordPress. What sorts of errors are you seeing? (Note: please just provide a few small snippets wrapped in code tags, rather than posting entire log files; also be sure to delete any sensitive server infos, thanks.)

    Here what you can see on homepage :

    Notice: Undefined index: gap_custom in /home/parental/www/wp-content/plugins/ga-google-analytics/ga-google-analytics.php on line 64

    Notice: Undefined index: link_attr in /home/parental/www/wp-content/plugins/ga-google-analytics/ga-google-analytics.php on line 65

    Notice: Undefined index: tracker_object in /home/parental/www/wp-content/plugins/ga-google-analytics/ga-google-analytics.php on line 66

    —————-
    parentalite34.fr

    Plugin Author Jeff Starr

    (@specialk)

    Alright, I’ll take another look for the next update. In the meantime if saving the new settings doesn’t work, keep in mind that they are not errors, just notices for the developer. Nothing to fret about. Thanks for reporting.

    Ok but these notices appear too in the public version of my website.

    Plugin Author Jeff Starr

    (@specialk)

    You should investigate and look into disabling errors/warning/notices on any public site. It can be a security risk. PHP warnings and such are intended for development/testing environments only. Here are some useful resources:

    https://codex.www.ads-software.com/Debugging_in_WordPress
    https://php.net/manual/en/function.error-reporting.php

    Read up, and if needed ask your host or developer for help in disabling error reporting on any production site(s).

    I’ ve tried in wp-config :

    define(‘WP_DEBUG’, false);
    define(‘WP_DEBUG_DISPLAY’, false);
    @ini_set(‘display_errors’,0);

    I’ve tried that solution too :

    Creating a php file in mu-plugins folder of WordPress, like :

    <?php
    error_reporting(E_ALL & ~( E_NOTICE | E_USER_NOTICE | E_STRICT |
    E_DEPRECATED | E_USER_DEPRECATED | E_WARNING | E_CORE_WARNING |
    E_USER_WARNING | E_COMPILE_WARNING | E_PARSE ));

    https://wycks.wordpress.com/2013/12/05/how-to-remove-error-notices-using-wordpresss-wp_debug/

    But none of above solve tne notices, they still appear.

    Plugin Author Jeff Starr

    (@specialk)

    Yeah like I said, I recommend reading up and contacting your host or developer for help if needed. All of this goes far beyond the realm of free support for any plugin. Hopefully the information has been useful and will help improve the overall security of your site.

    I have deleted the folder plugin GA Google Analytics from my ftp area and the notices still appear, it’s very strabge…

    Plugin Author Jeff Starr

    (@specialk)

    Yes, as explained, the display of notices, warnings, and errors has nothing to do with any specific plugin. So it has nothing to do with GA Google Analytics. Or any other plugin. It has to do with your server/software settings. Please talk to your host for help and/or more info as needed.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘PHP Notices triggered by plugin’ is closed to new replies.