• Resolved InfiniteMonk

    (@infinitemonk)


    I’ve installed this theme on two websites – one is a demo/test on my own hosting space, and the other is installed upon the site of the person whom I’m testing this theme for. On my own hosting account, the theme works brilliantly. However on my friend’s site, I’m getting php error messages in relation to the color-functions.php file.

    This is the message I get when I go to create a new Category. It doesn’t appear after trying to create a category or select a color, it’s just there on the page just above the color picker:

    Notice: Trying to get property of non-object in /home/happymum/public_html/wp-content/themes/mesocolumn/lib/functions/color-functions.php on line 7

    Also, this error message kicks in when I click save after editing the Menu structure:

    Notice: Undefined index: page_color in /home/happymum/public_html/wp-content/themes/mesocolumn/lib/functions/color-functions.php on line 137

    I can’t understand why these errors only show up when I use this theme on my friend’s website. I’ve uninstalled and reinstalled the theme – straight from the WordPress directory with no modifications made. Her site is running the latest version of WordPress. She does however have a different webhost from me, so could it be an issue with her server?

    Any suggestions would be much appreciated! Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Richie KS

    (@rkcorp)

    try open lib/functions/color-functions.php edit line 137

    $value = $_POST['page_color'];

    to

    $value = isset( $_POST['page_color'] ) ? $_POST['page_color'] : '';

    Thread Starter InfiniteMonk

    (@infinitemonk)

    That’s fixed the error message I was getting when updating the menu – thank you!

    There is still the following error message on line 7 when I try to assign category colors (thus I’m still unable to set colors for the categories).

    Notice: Trying to get property of non-object in /home/happymum/public_html/wp-content/themes/mesocolumn/lib/functions/color-functions.php on line 7

    Theme Author Richie KS

    (@rkcorp)

    try edit line 7

    $term_meta = get_theme_mod('cat_color_'.$t_id);

    to

    $term_meta = !empty(get_theme_mod('cat_color_'.$t_id)) ? get_theme_mod('cat_color_'.$t_id) : "";

    • This reply was modified 7 years, 11 months ago by Richie KS.
    Thread Starter InfiniteMonk

    (@infinitemonk)

    In my color-functions.php file, the content of line 7 isn’t the bit you just gave me, but rather this:

    $t_id = $term->term_id;

    That one you gave me is on line 8. However I replaced that bit of code on line 8 with the new one, and found that while the line 7 error message still remains when I go to create a new category… functions-color.php line 7 error and still prevents me from assigning a color when I create a new category, it turns out I can assign a colour by going into the edit page of a category after I’ve created it instead. Not sure if that’s due to the new bit of code you just gave me, but… Yay anyway! It’s fixed close enough! Thanks so much for your help and being so attentive to the support forum! ??

    • This reply was modified 7 years, 11 months ago by InfiniteMonk.
    Theme Author Richie KS

    (@rkcorp)

    thx will note this on next version.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘coding error message relating to color-functions.php’ is closed to new replies.