Topic Resolution: Resolved
  • Creator
    Topic
  • #21482

    Viktor
    Spectator
    Been thanked: 0 times

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
Replies
  • Denzel Chia
    Moderator
    Post count: 2831
    Been thanked: 91 times
    #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
    Post count: 11
    Been thanked: 0 times
    #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
    Post count: 2831
    Been thanked: 91 times
    #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

Viewing 3 replies - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.