Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    What happens when you try to add a new snippet? Does it fail with an error, or simply return a blank snippet form?

    sorry to hijack but i get the same – although i can edit an existing one it doesn’t save and and if i try to create a new one I get a blank snippet form

    hope that helps

    Plugin Author Shea Bunge

    (@bungeshea)

    Can you please copy the page URL after you try to save a new snippet and post it here? Also, does your new snippet still show up in the table on the Manage Snippets page?

    Hi Shea

    i’m just getting this wepageaddress/wp-admin/admin.php?page=add-snippet after trying to add anything

    no snippets are showing on the admin panel either

    Same here. Can’t save anything.

    After attempting to save a new snippet, I see the “saved” banner at the top, but I get a blank snippet form. If I return to the list of snippets, it’s not there.

    I have tried to save changes to an existing snippet, but that too doesn’t seem to save changes. I get the save banner at the top of the content area, but no changes are saved to the DB.

    I have manually added a record to the db, and that will show in the list of snippets properly. However, changes to this cannot be saved from the admin.

    Thread Starter Terence Milbourn

    (@pubdirltd)

    Hi Shea,

    It simply returns a blank snippet form.

    You enter the snippet, add the title and write nice long description, then click on save and Pooof! It looks like its saving it but when the screen comes back its all gone.

    I know Google has the code built into the Google Docs interface, and WordPress too now I believe, saves a local copy so that this sort of thing doesn’t happen under any circumstances. In fact if I remember right, even Gravity forms sells it as an add-on. Well they would wouldn’t they.

    Any way, good luck with the bug squishing.

    Terence.

    Thread Starter Terence Milbourn

    (@pubdirltd)

    Actually, if I remember rightly, you had this problem once before. Must have been a year or two back but I think I remember writing to you about it on an earlier version.

    Terence.

    Heads up, in case this helps with your trouble-shooting, nothing is being modified into/created in the DB either. It’s not like the code is getting stored anywhere and we just can’t see it

    **Edit, I should read better…didn’t see that one of the posts above already mentioned this…**

    Plugin Author Shea Bunge

    (@bungeshea)

    This bug puzzled me at first, as most of my sites didn’t seem to be affected. However, I have discovered that it has to do with the new tags feature that has been implemented into the main plugin. Those who haven’t ever used the separate Code Snippets Tags plugin are missing a column in their database, which is causing the save operation to fail.

    I’ll release a fix soon that fixes the upgrade function so it updates the database structure, but for those who want to fix this now they can:

    1. Export all snippets
    2. Remove the wp_snippets (or similar) table from the database (or uninstall and reinstall the plugin)
    3. Reimport the snippets to the site

    This should force a new table to be created with updated structure.

    Plugin Author Shea Bunge

    (@bungeshea)

    I’ve just released version 2.0.1 which should hopefully fix this bug.

    Thread Starter Terence Milbourn

    (@pubdirltd)

    Hi Shea, but that’s not logical from what I was seeing.

    I didn’t have a problem editing and saving previously entered snippets; only with adding new ones, which you would have thought would have created the necessary structure.

    Anyway, I think this is borne out by the fact that 2.0.1 still doesn’t save here. Entering a new snippet, the content stays in the windows and when its saved it doesn’t disappear, but when you go to the snippets list, there’s no entry for it.

    So you are one stage closer, but not quite there yet, from my point of view.

    I am now going to export, delete and reimport all my existing snippets and see if that changes the situation.

    I will let you know.

    Nil desperandum illegitimi… 8^)

    Thread Starter Terence Milbourn

    (@pubdirltd)

    Ooops! I was wrong it did save.

    I just didn’t see it because it was on the second page.

    What are the chances of that happening eh?

    Sorry about that.

    I’ve set the “snippets per page” to 99 now.

    My bad!

    Thread Starter Terence Milbourn

    (@pubdirltd)

    I wonder if other people are making the same mistake?

    Is there a reason to set the default ‘snippets per page’ limit to just 10?

    Thread Starter Terence Milbourn

    (@pubdirltd)

    OK, having now re-imported all 10 snippets (I only exported the first page, not knowing the ‘snippets per page’ limit was set to 10) I notice they now have the IDs of 15 to 25, where they were previously 1 to 10.

    Just an observation.

    Plugin Author Shea Bunge

    (@bungeshea)

    It’s a good point about snippets per page; I guess I just followed the posts per page setting, but I might change this in a future version.

    The IDs of the snippets do not really matter. Assigning IDs is handled by MySQL, which can sometimes seem to skip a few numbers to ensure they are always unique. Don’t worry about it ??

    It looks like this might be fixed, so I’ll mark it as resolved for now.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Version 2.0 won't save a new snippet’ is closed to new replies.