Support » Plugin: Code Snippets » Plugin Broke 5.03

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Shea Bunge


    I have used this plugin on many WP 5.0.3 sites myself without problems.

    If the plugin made your site crash immediately after activation, perhaps there is a collision with one of your existing plugins? If you are able to turn on WP_DEBUG and find out an error message, or track down the incompatible plugin, I would really appreciate it.

    Otherwise, did you add a snippet before the crash? If so, it is almost certainly due to the code in the snippet. You can find information in the pinned thread for how to enable safe mode and recover from this situation.

    Thread Starter calderwood


    I installed the plugin and activated. All successful. Then I clicked add new and the form came up, but it has a <?php at the top and I wanted to add some OG codes, so I cancelled the form, then looked at the four option – html, js etc, which were all toggled to an off state. As I didn’t see a meta tag example, I turned on the HTML sample and clicked edit and instantly got a HTTP ERROR 500. Had to delete the plugin manually from the plugin folder to get the site up.

    I have reproduced the error again on another WP install in a different account (my test server). The error only happened when you turn on the HTML Snippit. Here are the logs:
    Parse error: syntax error, unexpected ‘<‘ in /home/xxx/public_html/wordpress2/wp-content/plugins/code-snippets/php/snippet-ops.php(361) : eval()’d code on line 6

    Plugin Author Shea Bunge


    Ah, thank you for that information. It looks like there’s a bug in that sample snippet. I’ll update the code in the plugin, but you can fix the snippet on your site using this code:

    add_shortcode( 'shortcode_name', function () {
    	return '<p>write your HTML shortcode content here</p>';
    } );


    I have a similar scenario. I’ve got a local install on my PC. When I go view my home page, I have this error:

    Warning: Use of undefined constant CHILD_URL – assumed ‘CHILD_URL’ (this will throw an Error in a future version of PHP) in /app/public/wp-content/plugins/code-snippets/php/snippet-ops.php(361) : eval()’d code on line 4

    I see your code above but not sure where to implement it.

    Plugin Author Shea Bunge


    Hello @prodport,

    The error you describe is a completely different one. It’s coming from a code error in one of your snippets.

    You can search for CHILD_URL in the snippet search bar to narrow it down. If you post the code here (in a new thread as it’s a different issue), I can try to help you sort it out, but it’s not an error I can fix in the plugin itself.

    Hello @shea,

    thanks. That search tip was enough to get me going. I was able to figure out which snippet is providing the error. I’ll investigate from here.

    Plugin Author Shea Bunge


    Sure, good luck sorting it out @prodport.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Plugin Broke 5.03’ is closed to new replies.