• Resolved mira404

    (@mira404)


    Hi, I create a few php Snippets and Active them, but after some time later automatically deactivated All Snippets. How to solve this issue? Please check: https://prnt.sc/g0Ss5JasfpuN and

    Show this:

    This snippet was automatically deactivated because of a fatal erorr at 18:12:42 on 2023-06-21 (2 mins ago)
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @mira404,

    The snippets get automatically deactivated because they are throwing errors – please take a look at this article for more details on how that works: https://wpcode.com/docs/php-error-handling-safe-mode/

    I recommend temporarily enabling error logging in the WPCode settings and the next time a snippet gets deactivated, you can check the logs to see what caused the error.

    same here. only the snippets which are shipped within your plugin (like “Disable Emojis”) get deactivated. my own snippets don’t.
    my debug logs show this error multiple times:

    PHP Warning: preg_split(): Compilation failed: quantifier does not follow a repeatable item at offset 6 in /wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php(277) : eval()'d code on line 2
    • This reply was modified 1 year, 5 months ago by jkjkjk.
    Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @jkjkjk,

    That error is originating from the code of one of your snippets – you can search for preg_split in the search box of the snippet list to find which snippets are using that function and make sure the regex is correct.

    i found the snippet “Remove Query Strings From Static Files”.
    i think it’s from the shipped snippets ??

    deleted it. seems to work now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Deactivated All Snippets’ is closed to new replies.