• Resolved Mark

    (@markjcasey)


    Hi

    Used this plugin for years without issue. I just updated to the latest version and now none of my snippets are being loaded. If I try to edit and save any of them it says “Snippet updated.” but none of my changes have been saved.

    If I try to create a new snippet it says “An error occurred when saving the snippet.”

    Any help appreciated.

    • This topic was modified 6 years, 7 months ago by Mark.
Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter Mark

    (@markjcasey)

    Just rolled back to 2.10.1 and all seems to be fine on that version.

    Plugin Author Shea Bunge

    (@bungeshea)

    This is very strange, I didn’t encounter any issues when testing.

    I am wondering whether perhaps this has something to do with an issue adding the priority database column. Are you able to check the structure of your wp_snippets database table and see whether a ‘priority’ column exists?

    Thread Starter Mark

    (@markjcasey)

    Hi Shea

    Thanks for the reply.

    I’ve just checked my wp_snippets and no, the ‘priority’ column doesn’t exists.

    I am still running 2.10.1 though. Would I need to try the latest version again?

    Plugin Author Shea Bunge

    (@bungeshea)

    That would definitely be the issue, then.

    I’d hold off upgrading again just yet, because it seems like it’s definitely an issue that the database upgrade is not running sometimes.

    If you don’t mind, it would help if you were able to visit wp-admin/options.php on your site and let me know what the value for the code_snippets_version option is.

    Also, which version did you upgrade to 2.11.0 from? And are you using WordPress multisite, or just a regular install?

    Thank you for helping me work through this.

    Thread Starter Mark

    (@markjcasey)

    No problem, thank you for helping!

    OK, so…

    code_snippets_version = 2.11.0

    Sorry, I’m not sure which version I was on before. I usually update any plugins when I see there are updates so (looking at the changelog dates) it’s likely I was on 2.10.1

    Just a regular install, not a multi-site.

    • This reply was modified 6 years, 7 months ago by Mark.
    Plugin Author Shea Bunge

    (@bungeshea)

    Can I ask whether upgrading to the most recent version fixes this?

    Thread Starter Mark

    (@markjcasey)

    Hi Shea.

    Unfortunately not ?? I had to roll back to 2.11.0

    Plugin Author Shea Bunge

    (@bungeshea)

    Hey Mark,

    This has been open for a while. I was wondering whether you’ve had a chance to try out the latest release (v2.13.1), and if the error is still occuring on that version?

    Thread Starter Mark

    (@markjcasey)

    Hi Shea

    The latest version I’m seeing on my plugins page is 2.13.0

    I tried updating to that but have the same issue. Rolled back to 2.10.1

    Should I see v2.13.1 ?

    Plugin Author Shea Bunge

    (@bungeshea)

    Hi Mark,

    My apologies, it looks like 2.13.1 was not showing up yet when I wrote that post. I have just released v2.13.2, which is the version to give a try.

    Thread Starter Mark

    (@markjcasey)

    Just tried v2.13.2 and I’m sorry to say I’m seeing the same issue. ??

    I’m guessing it’s something specific to my site?

    Plugin Author Shea Bunge

    (@bungeshea)

    Thanks for checking – sorry that it hasn’t worked.

    It’s not something I’ve experienced myself, which is why I am finding it a bit difficult to debug.

    Are you able to check your wp_snippets database table again, and see if the priority column is still missing?

    Thread Starter Mark

    (@markjcasey)

    OK, updated to v2.13.2 and can confirm that the priority column is missing from the wp_snippets table.

    Plugin Author Shea Bunge

    (@bungeshea)

    That missing priority column would be the problem.

    It looks like this might be something that’s a little tricky to fix with a plugin update. As it doesn’t seem to be affecting many people, perhaps I could give you a solution to fix it on your site manually?

    If you are able to, running this SQL code on your database should do the trick:

    ALTER TABLE wp_snippets ADD priority SMALLINT NOT NULL DEFAULT 10;

    If your site’s snippets table is called something other than wp_snippets, remember to just change that part of the query.

    Thread Starter Mark

    (@markjcasey)

    Run the query and updated to the latest version. All seems fine now ??

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Just updated to latest version and now no snippets work or save’ is closed to new replies.