Topic Resolution: Resolved
  • Closed
  • Viktor
    Spectator
    October 18, 2015 at 7:46 pm #21482

    Hello,
    I’m having some issue recently with the button shortcode, on some of my post I have these messages:

    Notice: Undefined index: accent_color in ******************/wp-content/plugins/t4p-core/shortcodes/class-button.php on line 328

    Notice: Undefined index: accent_hover_color in ******************/wp-content/plugins/t4p-core/shortcodes/class-button.php on line 333

    Notice: Undefined variable: general_styles in ******************/wp-content/plugins/t4p-core/shortcodes/class-button.php on line 348

    Notice: Undefined variable: hover_styles in ******************/wp-content/plugins/t4p-core/shortcodes/class-button.php on line 353

    Everyting on my website is on the last version since I have auto updates in my settings.

    Thanks for your help!
    viktor.

    Denzel Chia
    Moderator
    Posts: 2656
    October 19, 2015 at 9:04 am #21497

    Hi,

    Do you have WP_DEBUG set to true?
    If yes, please set to false.

    If not, please provide WordPress admin access and FTP access in private reply.
    I will try to resolve.

    Thanks!

    Viktor
    Spectator
    Posts: 11
    October 19, 2015 at 10:37 am #21501

    Hey,
    I turned ON my WP_DEBUG to solve some issues… I was not expecting some errors popping from your code.
    So I turn it back OFF and the problem is solved from my side… however I hope your code will be checked to avoid this kind of errors…
    Thank you again for your help!
    Viktor.

    Denzel Chia
    Moderator
    Posts: 2656
    October 20, 2015 at 8:14 am #21529

    Hi,

    They are not errors, they are notices.

    Notice: Undefined index: accent_color in ******************/wp-content/plugins/t4p-core/shortcodes/class-button.php on line 328

    If there is any PHP error, you will only see a blank page on your website.
    and it will begin with PHP fatal error: ……

    That notice won’t appear if your shortcode uses that variable. Which means if an accent color is selected.

    Those notices are up to the theme author to decide if he wants to define the variables, such as by writing $accent_color = '';

    It doesn’t affect the outlook of the website.

    I understand that it looks cleaner if those notices don’t appear.
    But, I am just the support guy and not the theme author. It’s up to him to decide if this is one of his priorities.

    Thanks!
    Denzel