Support » Plugin: Code Snippets » Forgot final bracket, only deleting the plugin helps

  • Resolved crashguru

    (@crashguru)


    It is a Multisite, if I reinstall the plugin and try to enter the dashboard of the site where I entered the faulty code I am getting this error message:

    Fatal error: Cannot redeclare currency_switcher_price_fragment() (previously declared in /home/httpd/vhosts/xxx.com/httpdocs/wp-content/plugins/code-snippets/php/snippet-ops.php(352) : eval()’d code:45) in /home/httpd/vhosts/xxx.com/httpdocs/wp-content/plugins/code-snippets/php/snippet-ops.php(352) : eval()’d code on line 18

    The other sites are fine.

    What can I do?
    Thank you!

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

    (@bungeshea)

    You can enable safe mode, which will allow you to log in to the site with the problem snippet and delete it.

    Thanks, but will the problem snippet still be there even after I had deleted the plugin?

    Plugin Author Shea Bunge

    (@bungeshea)

    You don’t need to delete the entire plugin; just deleting the snippet will be sufficient.

    May be I did not make my self clear:
    I deleted the entire plugin because just deactivating it did not help!
    So can you please answer the question:
    Is the faulty snippet still stored, although I deleted the plugin?

    Thank you!

    Plugin Author Shea Bunge

    (@bungeshea)

    Oh, my apologies.

    Yes, the faulty snippet will still be stored on your site. By default, Code Snippets does not clean up its data when uninstalled, to prevent accidental loss of data.

    In order to fully uninstall, you need to first enable the “Complete Uninstall” option on the Snippets Settings page, and then delete the plugin through the WordPress “Plugins” menu.

    There is no “Complete Uninstall” in my Settings. I can send a screenshot if that helps.

    Plugin Author Shea Bunge

    (@bungeshea)

    Hey, sorry for taking so long to follow up on this.

    On multisite the Complete Uninstall setting only shows up in the settings for the main site or in the network dashboard. It should be under the General section on the Snippets > Settings page.

    The complete uninstall setting won’t show up on any of the settings for a subsite on a multisite network, so it’s possible that this is why it wasn’t appearing before. If you could double check to see whether it’s showing up in the main site settings and get back to me, that would be great.

    There is also no “Complete Uninstall” in the Network Settings of your plugin, and I would assume you know that…

    Plugin Author Shea Bunge

    (@bungeshea)

    There is supposed to be a Complete Uninstall setting for the main site settings only on multisite networks.

    If it’s not showing up on your site, then that is a bug specific to some aspect of your site.

    Since you offered earlier, perhaps a screenshot of the settings on the main site of your network might help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Forgot final bracket, only deleting the plugin helps’ is closed to new replies.