• Resolved yqx709abc

    (@yqx709abc)


    Hello. I would appreciate assistance. Code Snippets crashed my site because of code error. Below are my site’s details and notification of error.

    WordPress version 5.9.3
    Current theme: Hello Elementor (version 2.5.0) Current plugin: Code Snippets (version 3.1.0) PHP version 8.1.4

    Error: An error of type E_PARSE was caused in line 27 of the file /home4/crockera/public_html/wp-content/plugins/code-snippets/php/admin-menus/class-edit-menu.php(248) : eval()’d code. Error message: Unclosed ‘{‘ on line 11

    My site is not live because it’s in early development.

    Appreciate assistance. Thank you.

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

    (@bungeshea)

    This is an error in one of your snippets. You’re missing a closing } brace on line 11 of your snippet.

    Thread Starter yqx709abc

    (@yqx709abc)

    Hi Shea. Thank you for responding. I realize it’s missing a closing bracket; however, Code Snippets was somehow removed from my Dashboard, I assume by WordPress, so I can’t fix it. Do you have any suggestions how I could get it back? Presently, the plugin still shows on my plugin list; however, it’s deactivated because it crashes my site when it’s activated. The plugin is a great tool and I created a little reference library of snippets so I don’t want to lose it. I guess, the worst case scenario would be to remove the plugin. If I did that, would all my snippet files be deleted or will they be there when I reinstall the plugin? On second thought, if I reinstalled Code Snippets, I don’t know if it would show up on the Dashboard. I’m not an experienced web developer and I’d appreciate your thoughts in this dilemma. Thank you.

    Plugin Author Shea Bunge

    (@bungeshea)

    If you turn on the safe mode feature, you should be able to activate Code Snippets without your snippets crashing the site: https://help.codesnippets.pro/article/12-safe-mode

    Thread Starter yqx709abc

    (@yqx709abc)

    Hi Shea. Your instructions were great. Super thanks! In Elementor Pro, I put my site in Safe Mode, then used the Global Method to activate safe mode. Also, I located the file /home4/crockera/public_html/wp-content/plugins/code-snippets_old/php/snippet-ops.php, but I do not know what, if anything, I need to do. You also mentioned line 11 missing a } bracket. Now that I have access to Code Snippets the next challenge is to find the culprit snippet. I reviewed the snippets I thought I worked on, but couldn’t determine the error. Last week when I worked on some snippets, I remember a red X would indicate an error. I didn’t see any on them. Any further suggestions? Thanks.

    Plugin Author Shea Bunge

    (@bungeshea)

    No need to edit the plugin files – even though they are mentioned in the error message, the error is actually coming from one of cour snippets.

    It’s tricky to say which snippet it is without seeing them, but you could try doing a search for { @line:11 and seeing whether that narrows it down.

    Thread Starter yqx709abc

    (@yqx709abc)

    Hi Shea. Thanks for suggestion. I couldn’t find the particular file, so I went through all my files and tested each one by activation/deactivation. When I found an error, and there were many, I made note to self in comment section. Error files will be deactivated until I check them out. Since I don’t write code, it will take some time. Actually, all error snippets came from online sources. Long story short, my site is now out of safe mode and seems to be working fine. Thanks again, for your expertise and time. It is greatly appreciated. Have a great week. Cheers.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Snippet code crashed my site’ is closed to new replies.