Title: coding error message relating to color-functions.php
Last modified: December 6, 2016

---

# coding error message relating to color-functions.php

 *  Resolved [InfiniteMonk](https://wordpress.org/support/users/infinitemonk/)
 * (@infinitemonk)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/coding-error-message-relating-to-color-functions-php/)
 * 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](https://wordpress.org/support/users/rkcorp/)
 * (@rkcorp)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/coding-error-message-relating-to-color-functions-php/#post-8518929)
 * 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](https://wordpress.org/support/users/infinitemonk/)
 * (@infinitemonk)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/coding-error-message-relating-to-color-functions-php/#post-8519458)
 * 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](https://wordpress.org/support/users/rkcorp/)
 * (@rkcorp)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/coding-error-message-relating-to-color-functions-php/#post-8522146)
 * 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 9 years, 6 months ago by [Richie KS](https://wordpress.org/support/users/rkcorp/).
 *  Thread Starter [InfiniteMonk](https://wordpress.org/support/users/infinitemonk/)
 * (@infinitemonk)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/coding-error-message-relating-to-color-functions-php/#post-8522894)
 * 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 9 years, 6 months ago by [InfiniteMonk](https://wordpress.org/support/users/infinitemonk/).
 *  Theme Author [Richie KS](https://wordpress.org/support/users/rkcorp/)
 * (@rkcorp)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/coding-error-message-relating-to-color-functions-php/#post-8527533)
 * 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.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/mesocolumn/1.6.5.1/screenshot.
   png)
 * MesoColumn
 * [Support Threads](https://wordpress.org/support/theme/mesocolumn/)
 * [Active Topics](https://wordpress.org/support/theme/mesocolumn/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/mesocolumn/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/mesocolumn/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Richie KS](https://wordpress.org/support/users/rkcorp/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/coding-error-message-relating-to-color-functions-php/#post-8527533)
 * Status: resolved