WordPress.org

Forums

Standout Color Boxes and Buttons
[resolved] Error message on using shortcode (31 posts)

  1. Deeabolique
    Member
    Posted 1 year ago #

    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/

    https://wordpress.org/plugins/standout-color-boxes-and-buttons/

  2. volfan
    Member
    Posted 1 year ago #

    After updating to latest version I am getting this same error code as well.

  3. volfan
    Member
    Posted 1 year ago #

    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.

  4. Scott
    Member
    Posted 1 year ago #

    I had the same Warning after updating to the latest version. You can go back to the previous version until a fix is released.

  5. Scott
    Member
    Posted 1 year ago #

    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).

  6. ve7tcc
    Member
    Posted 1 year ago #

    I tried it, it gives no warnings, but the color of the buttons is gone :(

  7. Scott
    Member
    Posted 1 year ago #

    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.

  8. Deeabolique
    Member
    Posted 1 year ago #

    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

  9. volfan
    Member
    Posted 1 year ago #

    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.

  10. Mr_Man1968
    Member
    Posted 1 year ago #

    Same problem with buttons no longer showing. Can someone tell me how to roll back please?

  11. Scott
    Member
    Posted 1 year ago #

    @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
    Replace the plugin files on your site with the files from the old version and you should be all set.

  12. Mr_Man1968
    Member
    Posted 1 year ago #

    Oizuled,

    Thanks for your help - old version installed & all is well again. Hope the developer is aware of the problem.

  13. photoMaldives
    Member
    Posted 1 year ago #

    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).

  14. jester6581
    Member
    Posted 1 year ago #

    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!

  15. linaudvid
    Member
    Posted 1 year ago #

    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 ?

  16. Scott
    Member
    Posted 1 year ago #

    You should probably replace them all.

  17. Mr_Man1968
    Member
    Posted 1 year ago #

    Surprised the developer hasn't chipped in here...

  18. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry for the issue, I am looking into this and should have a fix later today. Thx

  19. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    Issue resolved, new version will be uploaded in the next couple of hours.

  20. carldietz
    Member
    Posted 1 year ago #

    Hi Jimmy,
    Any word on when the fix will be published? I don't want to roll back to the previous version if you are planning to release the fix soon.

    If you are having trouble resolving the bugs, maybe you could post the old code for those of us who are not technical enough to replace the buggy new code on our sites. The last thing i want to do is break my site further by trying to replace all the old code by hand.

  21. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry, time warner decided that today was the day to start having problems with my internet connection. As a stopgap, edit the scbb.php file and delete everything inside the "scbb_filter_hex_color" function except for the last line (the line that returns the value). This should resolve issues with the plugin until I can get back online.

  22. coops456
    Member
    Posted 1 year ago #

    Thanks Jimmy, that stopgap edit worked for me.
    Great plugin by the way, I appreciate your hard work.

  23. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    If you want the stopgap code, here it is:

    function scbb_filter_hex_color($colorvalue) {
      return $colorvalue;
    }

    This will simply return the hex color value without any validation and without having to touch anything else in the plugin. So you need to use the full hex color value including '#'.

    As soon as my internet is restored (ugh) I'll update the plugin to correct it.

  24. carldietz
    Member
    Posted 1 year ago #

    I am up and running with the stopgap. Thanks Jimmy. Great plugin.

  25. linaudvid
    Member
    Posted 1 year ago #

    Have been trying the stopgap fix but it doesnt seem to work for me.

    Great plugin hope there is update available to fix this soon.

  26. linaudvid
    Member
    Posted 1 year ago #

    Hi

    Installed the update but still getting clear color buttons using :

    [color-button color="red" href="http://www.mysite.com/"]
    Follow this link
    [/color-button]

    And

    [color-button color="#ff0000"]
    Button text.
    [/color-button]

  27. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    @linaudvid

    I just tried that shortcode on my site, it works. Are you sure the plugin is activated and enabled?

    Regarding your second shortcode, the parameter for a custom hex value is "customcolorpicker", not "color".

    [color-button customcolorpicker="#ff0000"]
    Button text.
    [/color-button]
  28. linaudvid
    Member
    Posted 1 year ago #

    Hi

    Tried the "customcolorpicker" and still clear buttons

    The buttons with the problem are on the Website:

    http://www.constantcoaching.co.uk/

  29. linaudvid
    Member
    Posted 1 year ago #

    Hi

    Just installed new update and all working fine.

    Thanks for your help.

    Good Plugin

  30. carldietz
    Member
    Posted 1 year ago #

    I really appreciate your hard work Jimmy, but i can't keep going thru your failed upgrades. Of the many many plugins I have on my sites, your is the only one that has failed twice this year on new releases.

    I paid $18 today for a commercial plug in. I would have gladly sent you $18. You have a cool plugin but you don't seem to understand that people depend on it to work correctly. Its very simple code. I'm leaving the tribe today.

    Now I have to update 140 pages with 3 color boxes each. Ugh!

    Best wishes to you and thanks for making plugins.

    Carl

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Standout Color Boxes and Buttons
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.