• This problem has been mentioned in other threads but it doesn’t seem to be getting any attention.

    On WordPress multisite, I’m getting a 500 error every time I save a snippet. Problem occurs on all versions released beyond 3.3.0.

    It happens regardless of snippet, every time you select “Allow this snippet to be activated on individual sites on the network”. Snippet saves fine if you leave this box unchecked, thus this plugin no longer supports multisite.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I tested this issue myself and I was able to reproduce it from the Network Dashboard > Snippets, when editing an activated snippet and try to update it after enabling the “Allow this snippet to be activated on individual sites on the network”.

    Here is the error trace:

    [21-Sep-2023 22:31:23 UTC] PHP Fatal error:  Uncaught Error: Object of class Code_Snippets\Snippet could not be converted to string in public_html\wp-content\plugins\code-snippets\php\snippet-ops.php:245
    Stack trace:
    #0 public_html\wp-content\plugins\code-snippets\php\snippet-ops.php(245): array_diff(Array, Array)
    #1 public_html\wp-content\plugins\code-snippets\php\snippet-ops.php(554): Code_Snippets\update_shared_network_snippets(Array)
    #2 public_html\wp-content\plugins\code-snippets\php\rest-api\class-snippets-rest-controller.php(270): Code_Snippets\save_snippet(Object(Code_Snippets\Snippet))
    #3 public_html\wp-includes\rest-api\class-wp-rest-server.php(1188): Code_Snippets\REST_API\Snippets_REST_Controller->update_item(Object(WP_REST_Request))
    #4 public_html\wp-includes\rest-api\class-wp-rest-server.php(1035): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/code-snippets/...', Array, NULL)
    #5 public_html\wp-includes\rest-api\class-wp-rest-server.php(447): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #6 public_html\wp-includes\rest-api.php(418): WP_REST_Server->serve_request('/code-snippets/...')
    #7 public_html\wp-includes\class-wp-hook.php(310): rest_api_loaded(Object(WP))
    #8 public_html\wp-includes\class-wp-hook.php(334): WP_Hook->apply_filters('', Array)
    #9 public_html\wp-includes\plugin.php(565): WP_Hook->do_action(Array)
    #10 public_html\wp-includes\class-wp.php(398): do_action_ref_array('parse_request', Array)
    #11 public_html\wp-includes\class-wp.php(779): WP->parse_request('')
    #12 public_html\wp-includes\functions.php(1335): WP->main('')
    #13 public_html\wp-blog-header.php(16): wp()
    #14 public_html\index.php(17): require('public_html\...')
    #15 {main}
      thrown in public_html\wp-content\plugins\code-snippets\php\snippet-ops.php on line 245
    Plugin Author lightbulbman

    (@lightbulbman)

    Hello @lifeinnerlasting

    After upgrading to version 3.5 are you still facing this issue?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘500 error saving snippets’ is closed to new replies.