• Resolved jonoman1

    (@jonoman1)


    This has me baffled. I have about 10 php snippets and a few times a day they turn off without me touching them. I have to click the status to turn on again, only for them to turn off sometimes half an hour later. With the exception of 2 snippets they all end up turned off. Does anyone know what would cause this? I don’t see any errors or anything. I’m trying to figure out if some action on the site is triggering this, but so far I can’t link it to anything.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @jonoman1,

    WPCode has a built-in error-protection system that disables snippets that throw a fatal error.
    From what you are describing I would look at the list of snippets and inspect the snippet right above the 2 snippets that remain active, that is likely the one causing the error.
    If you can’t spot the issue directly I would try to look at the server PHP error logs.
    Usually, this behaviour happens when your snippet doesn’t have an obvious error (like a syntax error) but throws an error later, like when a hook is called.

    We are going to improve the error logging in the future to make it easier to spot these errors.

    some time snippet A is superior to snippet B. This will create conflict and possibly terminate B when A is triggered. To fix, combine B content into A, or use only one of them. Usually happened with woocommerce hooks/filters.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.