• I’m unable to save any page that has a shortcode to an active snippet. I’ve tried using a test snippet with <?php echo “hello world!”; ?> and the sample snippets, and had the same internal server 500 error.

    The email with the error details shows the following:

    WordPress version 6.0
    Active theme: Stratus Child Theme (version 1.0.0)
    Current plugin: Code Snippets (version 3.1.1)
    PHP version 7.2.34
    
    Error Details
    =============
    An error of type E_PARSE was caused in line 5 of the file /home/rsx11q78o06e/public_html/wp-content/plugins/code-snippets/php/front-end/class-frontend.php(200) : eval()'d code. Error message: syntax error, unexpected end of file

    If I deactivate the snippet, I’m able to save the page with the shortcode intact. If I then reactivate the snippet, the page is stuck in a loading screen and the editor gives a critical error warning. The behavior is the same whether I use my php code or the sample snippets.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Nate Leibzon

    (@nate33)

    Hey @caseyskl
    Thank?you for your message!
    We are currently working on the pro version?so we are a little bit late with a response. We will get back to you as soon as we can.
    Thank you!

    Plugin Author Shea Bunge

    (@bungeshea)

    Hi @caseyskl,

    Can you try adding this as a Content Snippet:

    <?php
    
    echo date( 'Y-m-d H:i:s' );
    
    ?>
    

    Saving, adding the shortcode, and seeing if that works?

    Also, if you could post a screenshot of the code in the snippet editor and then the shortcode in the post, that would be really helpful.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘E_PARSE error’ is closed to new replies.