• ebrissette

    (@ebrissette)


    We have a number of multisite networks, and some of them continue to receive Error 500 when saving network snippets, even after upgrading to 3.6.2.

    We have verified that the update scripts have run (code_snippets_version = 3.6.2 in the affected sites) but the wp_ms_snippets table is missing the revision and cloud_id columns.

    Do you have any thoughts as to why the wp_ms_snippets table might be getting updated for some multisite networks but not others?

    We can manually add the columns, but this has happened before where the entire wp_ms_snippets table wasn’t being created, and we had to manually do that. If possible, it’d be great to determine the root cause so we can avoid future issues.

    • This topic was modified 1 year ago by ebrissette.
Viewing 4 replies - 1 through 4 (of 4 total)
  • umduck

    (@umduck)

    We are still seeing this error happen on our staging & prod multisites and this is the corresponding fatal error 500 log entry:

    2023/11/16 16:30:57 [error] 106374#106374: *19746 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Object of class Code_Snippets\Snippet could not be converted to string in /www/domain/public/wp-content/plugins/code-snippets/php/snippet-ops.php:245
    Stack trace: 0 /www/domain/public/wp-content/plugins/code-snippets/php/snippet-ops.php(245): array_diff(Array, Array) 1 /www/domain/public/wp-content/plugins/code-snippets/php/snippet-ops.php(555): Code_Snippets\update_shared_network_snippets(Array) 2 /www/domain/public/wp-content/plugins/code-snippets/php/rest-api/class-snippets-rest-controller.php(270): Code_Snippets\save_snippet(Object(Code_Snippets\Snippet)) 3 /www/domain/public/wp-includes/rest-api/class-wp-rest-server.php(1193): Code_Snippets\REST_API\Snippets_REST_Controller->update_item(Object(WP_REST_Request)) 4 /www/domain/public/wp-includes/rest-api/class-wp-rest-server.php(1041): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/code-snippets/…', Array, NULL) 5 /www/domain/public/wp-inclu" while reading response header from upstream, client: 141.213.165.186, server: domain.com, request: "POST /wp-json/code-snippets/v1/snippets/1?network=true HTTP/2.0", upstream: "fastcgi://unix:/var/run/php8.1-fpm-rossweb.sock:", host: "domain.com:17905", referrer: "https://domain.com/wp-admin/network/admin.php?page=edit-snippet&id=1"
    Thread Starter ebrissette

    (@ebrissette)

    Different from ours, which fails on the database update when saving a snippet.

    2023/11/15 10:39:13 [error] 106009#106009: *2244666 FastCGI sent in stderr: "PHP message: WordPress database error Unknown column 'revision' in 'field list' for query UPDATE wp_ms_snippets SET name = ...

    Thread Starter ebrissette

    (@ebrissette)

    We deleted all code snippets tables, uninstalled the plugin, and re-installed the plugin.

    The individual site tables are created as expected, but the multisite table (wp_ms_snippets) is not.

    It feels like the plugin install/update functions are not recognizing these sites as being multisite networks.

    Jim Walczak

    (@jimwalczak)

    I’ve been having the same problem for sometime and decided to try an address it today.

    I suspect they don’t want this used in a multisite environment and forgot to tell the multisite users that this would no longer be available.

    Makes you just want to jump up and buy Pro with confidence right? It’s not even addressed as a multisite feature on Pro – so I suspect an oversight.

    Oh, well, it used to be nice and work

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multisite Network – Error 500 when saving a network snippet (version 3.6.2)’ is closed to new replies.