• Resolved costind

    (@costind)


    Whilst developing a snippet I have inadvertently made a mistake by turning on 2 snippets that clash with each other. Now when I try to access the web site I get this message: –

    Fatal error: Cannot redeclare create_entry_after_submission() (previously declared in /homepages/38/d514219189/htdocs/app545640219/wp-content/plugins/code-snippetsOLD/php/snippet-ops.php(353) : eval()’d code:2) in /homepages/38/d514219189/htdocs/app545640219/wp-content/plugins/code-snippetsOLD/php/snippet-ops.php(353) : eval()’d code on line 28

    I can deactivate the plugin in order to access the web site. But this does not solve the problem of accessing the snippets to rectify the errors. When I reactivate the plugin I crash the website and get the above code.

    The page I need help with: [log in to see the link]

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

    (@bungeshea)

    I’d recommend using safe mode to solve this.

    Thread Starter costind

    (@costind)

    Many thanks for that. It sounded promising, but unfortunately it didn’t work.

    Plugin Author Shea Bunge

    (@bungeshea)

    Did you add this line to your wp-config.php file?

    define( 'CODE_SNIPPETS_SAFE_MODE', true );

    After adding it, your snippet code should temporarily stop running, so you can log in to your site and disable the problem snippet.

    Thread Starter costind

    (@costind)

    Many thanks. I will have a look at this.

    Thread Starter costind

    (@costind)

    I do not have access to WP-config.

    Is it possible to access the folder where each snippet code is stored?

    Thread Starter costind

    (@costind)

    Any thoughts on my previous comments? I am anxious to access the snippets because I did not keep a copy of the code therefore I cannot delete the plugin and re-install.

    Regards

    David

    Hey Man, I contacted my host and they have a live chat where I was able to get them to go in and out of safe mode for me. That way all I did was go into the admin through safe mode and could edit my snippets. Have you tried contacting your host?

    Plugin Author Shea Bunge

    (@bungeshea)

    Hey @costind

    If you look at the page I linked, there is an alternative way of enabling safe mode that is much easier to use.

    Visit your site URL with /wp-admin/admin.php?page=snippets&snippets-safe-mode=true on the end (e.g. https://example.com/wp-admin/admin.php?page=snippets&snippets-safe-mode=true). Log in with an administrator account and you should be able to disable snippets without them running on your site.

    Thread Starter costind

    (@costind)

    Thank you for that. Unfortunately it didn’t work, ‘Access Denied’.

    David

    Thread Starter costind

    (@costind)

    Recruited the help of someone to help me with your initial advice. All back to normal now.
    Many thanks for your help.

    David

    Plugin Author Shea Bunge

    (@bungeshea)

    Excellent, good to hear.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘fatal Error’ is closed to new replies.