Title: Error message on using shortcode
Last modified: August 21, 2016

---

# Error message on using shortcode

 *  Resolved [Deeabolique](https://wordpress.org/support/users/deeabolique/)
 * (@deeabolique)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/)
 * Hi,
 * I’m sorry, I’m pretty new to WordPress so not sure if I’m doing something wrong,
   but when I run the shortcode on a page,it shows the color box but I get this 
   error message:
 * Warning: preg_match() [function.preg-match]: Unknown modifier ‘{‘ in /home/thebitef/
   public_html/wp-content/plugins/standout-color-boxes-and-buttons/scbb.php on line
   629
 * Could you please help me out with this?
 * Thanks
 * Posting the URL here:
 * [http://thebitefantastic.com/cheesecake-brownies/](http://thebitefantastic.com/cheesecake-brownies/)
 * [https://wordpress.org/plugins/standout-color-boxes-and-buttons/](https://wordpress.org/plugins/standout-color-boxes-and-buttons/)

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/error-message-on-using-shortcode/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/error-message-on-using-shortcode/page/2/?output_format=md)

 *  [volfan](https://wordpress.org/support/users/volfan/)
 * (@volfan)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706773)
 * After updating to latest version I am getting this same error code as well.
 *  [volfan](https://wordpress.org/support/users/volfan/)
 * (@volfan)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706784)
 * I’ve searched all over and can’t find code error, going back to last version 
   until there’s an answer here, need to take site live for client so can’t wait
   at the moment for resolution.
 *  [Scott DeLuzio](https://wordpress.org/support/users/scottdeluzio/)
 * (@scottdeluzio)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706805)
 * I had the same Warning after updating to the latest version. You can go back 
   to the [previous version](https://plugins.trac.wordpress.org/browser/standout-color-boxes-and-buttons/trunk?rev=856787)
   until a fix is released.
 *  [Scott DeLuzio](https://wordpress.org/support/users/scottdeluzio/)
 * (@scottdeluzio)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706811)
 * I think I found a fix for this issue:
 * The function starting on line 628 in scbb.php should change from:
 *     ```
       function scbb_filter_hex_color($colorvalue) {
       	if (preg_match('[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}$', $colorvalue)) {
       		$colorvalue = '#' . $colorvalue;
       	}
       	return $colorvalue;
       }
       ```
   
 * to
 *     ```
       function scbb_filter_hex_color($colorvalue) {
       	if (preg_match('~(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])^[A-Za-z0-9]{6}$~' | '~(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])^[A-Za-z0-9]{3}$~', $colorvalue)) {
       		$colorvalue = '#' . $colorvalue;
       	}
       	return $colorvalue;
       }
       ```
   
 * **I only tested this to the extent that I found it makes the warning message 
   go away. I didn’t do any other testing to see that the function otherwise does
   what it is supposed to do (validate hex color values).**
 *  [ve7tcc](https://wordpress.org/support/users/ve7tcc/)
 * (@ve7tcc)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706813)
 * I tried it, it gives no warnings, but the color of the buttons is gone 🙁
 *  [Scott DeLuzio](https://wordpress.org/support/users/scottdeluzio/)
 * (@scottdeluzio)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706821)
 * In the shortcode for the buttons are you using the hex color or the name of the
   color?
 * Hex:
 *     ```
       [color-button color="#ff0000"]
       Button text.
       [/color-button]
       ```
   
 * Color Name:
 *     ```
       [color-button color="red"]
       Button text.
       [/color-button]
       ```
   
 * I got it to work using the color name. Also if you had any custom styles in the
   plugin’s css/custom.css, you might need to double check that they are still there
   if you reverted back to the old version of the plugin.
 * EDIT:
    I spoke too soon. I had it working using the [color-box] shortcode. [color-
   button] is not working correctly for me either.
 *  Thread Starter [Deeabolique](https://wordpress.org/support/users/deeabolique/)
 * (@deeabolique)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706867)
 * Yep, color button’s not working for me either. I think I’ll just temporarily 
   go back to the previous version till a fix is found
 *  [volfan](https://wordpress.org/support/users/volfan/)
 * (@volfan)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706873)
 * Thank you Oizuled for all your hard work trying to find solution. I’m going to
   go back to previous version so I can get client’s site live this morning. Hopefully
   they’re working on a solution and will post when they have it.
 *  [Mr_Man1968](https://wordpress.org/support/users/mr_man1968/)
 * (@mr_man1968)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706874)
 * Same problem with buttons no longer showing. Can someone tell me how to roll 
   back please?
 *  [Scott DeLuzio](https://wordpress.org/support/users/scottdeluzio/)
 * (@scottdeluzio)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706876)
 * [@mr_man1968](https://wordpress.org/support/users/mr_man1968/) You can download
   the files from the previous version here: [https://plugins.trac.wordpress.org/browser/standout-color-boxes-and-buttons/trunk?rev=856787](https://plugins.trac.wordpress.org/browser/standout-color-boxes-and-buttons/trunk?rev=856787)
   
   Replace the plugin files on your site with the files from the old version and
   you should be all set.
 *  [Mr_Man1968](https://wordpress.org/support/users/mr_man1968/)
 * (@mr_man1968)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706878)
 * Oizuled,
 * Thanks for your help – old version installed & all is well again. Hope the developer
   is aware of the problem.
 *  [photoMaldives](https://wordpress.org/support/users/photomaldives/)
 * (@photomaldives)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706900)
 * same problem here –
 * `Warning: preg_match() [function.preg-match]: Unknown modifier '{' in /home/.../
   public_html/mysite.com/wordpress/wp-content/plugins/standout-color-boxes-and-
   buttons/scbb.php on line 629`
 * **`Warning: preg_match() [function.preg-match]: Unknown modifier '{' in ... scbb.
   php on line 629`
 * Will try rolling back as per the above – thanks for the link. (Weird – when I’ve
   needed to do this in the past, the previous versions have all been listed under
   the Developers tab – but they’re not showing for this plugin).
 *  [jester6581](https://wordpress.org/support/users/jester6581/)
 * (@jester6581)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706906)
 * Same problem here and rolled back successfully with the link above. Thanks for
   the help Oizuled!
 * Hope these issues are solve real soon! Love this plugin!
 *  [linaudvid](https://wordpress.org/support/users/linaudvid/)
 * (@linaudvid)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706924)
 * Color Buttons have no color since the 0.5.3 update
 * Just replaced the scbb.php and the website produced error reports
 * To fix this problem do you replace all the plugin files ?
 *  [Scott DeLuzio](https://wordpress.org/support/users/scottdeluzio/)
 * (@scottdeluzio)
 * [12 years ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/#post-4706926)
 * You should probably replace them all.

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/error-message-on-using-shortcode/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/error-message-on-using-shortcode/page/2/?output_format=md)

The topic ‘Error message on using shortcode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/standout-color-boxes-and-buttons_e4ecf9.
   svg)
 * [Standout Color Boxes and Buttons](https://wordpress.org/plugins/standout-color-boxes-and-buttons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/standout-color-boxes-and-buttons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/standout-color-boxes-and-buttons/)
 * [Active Topics](https://wordpress.org/support/plugin/standout-color-boxes-and-buttons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/standout-color-boxes-and-buttons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/standout-color-boxes-and-buttons/reviews/)

 * 30 replies
 * 11 participants
 * Last reply from: [jp2112](https://wordpress.org/support/users/jp2112/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/error-message-on-using-shortcode/page/2/#post-4707031)
 * Status: resolved