WordPress.org

Ready to get started?Download WordPress

Forums

Code Snippets
[resolved] Cant add snippet (26 posts)

  1. backspace_
    Member
    Posted 1 year ago #

    Hi i am using wordpress multisite and i have installed code snippets plugin. But when i try to add a snippets it doesnt appear in the manage. :s

    I have network acitvated the plugin. :s

    i dont understand why it ist showing in the snippet manage.

    http://wordpress.org/extend/plugins/code-snippets/

  2. Shea Bunge
    Member
    Plugin Author

    Posted 1 year ago #

    Strange… so you enter your code and a name for the snippet, save the snippet, and nothing appears on the manage snippets page? If so, can you tell me if a wp_snippets table exists in your WordPress database and, if so, is it empty or not?

  3. andygs
    Member
    Posted 1 year ago #

    Hi,
    i have the same problem (Multisite Version 3.5.1 PHP 5.54 Mysql 5.5.28)

    1. i try Import from snippets:
    "you have added 9 snippets"
    but nothing appears on the manage snippets page

    2.
    I try to add snippets direct:
    "Codes Snippets activate"
    but nothing appears on the manage snippets page

    I found no wp_snippets table in my WordPress database
    I delete/install and activate the plugin a few Times - still no snippets table in Database

  4. mlbs
    Member
    Posted 1 year ago #

    Hello,

    I have the same problem i tried to add 3 snippets but nothing saves to the manage snippets page, After adding snippet and short title when you click save and activate or just save it just goes back to the add snippet again like you never even added anything.

  5. violacase
    Member
    Posted 1 year ago #

    Also here a (probably the same as above) problem with WPMU:

    After submitting a well filled in form for a new snippet the form fields are emptied and a message is given:

    Please provide a name for the snippet and its code

    UPDATE: I did a fresh WPMU install with no other plugins activated and tried to network activate the plugin.
    Gives this warning 4 times:

    Warning: in_array() expects parameter 2 to be array, boolean given in W:\bootje\wp-content\plugins\code-snippets\code-snippets.php on line 543

  6. blogjunkie
    Member
    Posted 1 year ago #

    Hi Shea, thanks for making this plugin. Unfortunately I'm also having the same problem as the others here on a multisite install.

    I am able to activate the plugin on the main site or by network activating it. However when I try to add a snippet I get this error:

    Please provide a name for the snippet and its code. 

    It would be great if you can solve this when you have the time. Thanks!

  7. Jennifer Ross
    Member
    Posted 1 year ago #

    Hi Shea- I am having the same issue in my multisite install that the others are reporting. (Both when network activated, and per site activated) It is working just fine in my regular single site installs so it appears to be a multisite issue? I am using a sub domain setup for my sub sites.

    I tested activating per site as well, and when I log in as the sub-site admin, I am able to activate the plugin, but when I try to manage, I see, "You do not have sufficient permissions to access this page." When I am logged in as super admin and go to that same sub site, I can activate the plugin and manage, but when I add a snippet, it doesn't save, and I get the following "Please provide a name for the snippet and its code" (the same message that I get when I have it network activated.)

    can you tell me if a wp_snippets table exists in your WordPress database and, if so, is it empty or not

    I do not see a wp-snippets table in my database.

    Thanks for this great plugin. It would be handy to use on my multisite as well. :)

  8. violacase
    Member
    Posted 1 year ago #

    I am having the same issues on multisite as Jennifer Ross mentions.
    Author should have tested it and should have mentioned on the introduction page that the plugin doesn't work on multisite configurations. Now lots of people are getting frustrated and loose a lot of developing time because they don't understand the non function and try to figure it out.

  9. Terence
    Member
    Posted 1 year ago #

    Same problem here on a brand new WP v3.5.2, Genesis 2.0 beta 2, network install. No matter what kind of snippet, title or description ~ on hitting SAVE it just comes back with "Please provide a name for the snippet and its code."

  10. violacase
    Member
    Posted 1 year ago #

    Well, the author is on a LONG vacation I think.
    On the other hand: Is this plugin THAT important?
    Pros: it's easy. (And I like the idea)
    Cons: you make yourself dependent on author's mood to develop or not, probably less rendering performance because of (perhaps many) database accesses.

  11. Shea Bunge
    Member
    Plugin Author

    Posted 1 year ago #

    No, I'm not on vacation, still here answering support threads :)

    I'm just really busy at the moment, but I'm still working on the next version of Code Snippets, which will, among other things, remove the restriction of needing a name and code for a snippet at all.

    If you're interested in how the development's going, check out the GitHub repo.

  12. violacase
    Member
    Posted 1 year ago #

    Hi Shea, thanks for your reply.
    Just to be sure: do you test the new version(s) also for multisite configurations?

  13. Terence
    Member
    Posted 1 year ago #

    I just checked out the current version on a standard install and it works fine. Its just the network version it seems to be having problems with.

  14. Shea Bunge
    Member
    Plugin Author

    Posted 1 year ago #

    @violacase yes, I actually run Code Snippets on my personal multisite network, and my primary dev environment is also a multisite network.

    The plugin should be released soon; I just want to make sure that it's ready and fixes all known bugs before I ship it.

  15. violacase
    Member
    Posted 1 year ago #

    Great Shea!
    As said before: I really like your concept.
    Remains one important question: could you also do some performance tests? I don't know if a sequence of database calls will significantly slow down the rendering process. Perhaps it maybe even faster then the traditional one time file (functions.php) access?

  16. Shea Bunge
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm… not sure why last message posted twice, but anyway.

    I think I may have narrowed down the saving issue to the Code Snippets Tags plugin. Can I confirm if you are all using this plugin or not?

  17. mlbs
    Member
    Posted 1 year ago #

    yes i am using the code snippet tag plugin as well,

    Thx for the updates on the plugin, look forward to updated version for the multisite

  18. violacase
    Member
    Posted 1 year ago #

    I don't know what you want Shea.
    A second ago I downloaded the (latest?) version and installed in on dev multisite. Still doesn't work. How do you expect me to 'use' it?

  19. blogjunkie
    Member
    Posted 1 year ago #

    @violacase I think you should give @bungeshea a break.

    How do you expect me to 'use' it?

    Here's an idea. How about you don't use it? Obviously it doesn't work for you so just don't use it and look for another solution. Or maybe you could write a plugin that does what you want.

    It's a plugin that he's offered to the community freely. You didn't pay anything and he doesn't owe you anything. There's no need to be mean just because it doesn't work for you.

  20. Shea Bunge
    Member
    Plugin Author

    Posted 1 year ago #

    Just wait a bit longer; Code Snippets 1.8 should be ready soon. I'm just working on fixing the last of the bugs.

    @violacase I was just checking if you had the Code Snippets Tags plugin installed and activated as well.

  21. Terence
    Member
    Posted 1 year ago #

    No Shea, not using the tags plugin here. I have moved the site in the last 24 hours, to a new server entirely. But I still have the same problem, when I try and save anything in the plugin, I get the "Please provide a name for the snippet and its code." error message, even though I have provided one.

  22. violacase
    Member
    Posted 1 year ago #

    @blogjunkie: Shea KNOWS my ideas about his plugin. (i.e. VERY promising)
    No pun intended.

    @Shea: Fine! No hurry, I can wait...

  23. Terence
    Member
    Posted 1 year ago #

    OK, v1.8 does the trick on WP Multi-Site and seems to be fixed now.

    Thanks Shea!

  24. Shea Bunge
    Member
    Plugin Author

    Posted 1 year ago #

    So 1.8 has fixed this problem for everyone?

  25. violacase
    Member
    Posted 1 year ago #

    Hi Shea,

    I quickly tested the new version and all seems to work fine now. Didn't test it entirely yet: I'll open a new thread if problems arise.

    Good job giving the choice of network vs per site activation :-) Works like a charm.

    One last remark. Did you do some performance tests with/without cacheing? Everybody loves quick rendering.
    I ask you to also test without cacheing because cacheing is very problematic with the latest WP multisite releases. (HtAccess problems)

    Keep up the good work!

  26. Shea Bunge
    Member
    Plugin Author

    Posted 1 year ago #

    @violacase no, I haven't had time to do any benchmarking tests yet.

    I use Code Snippets on my dev network install, which does not use caching, and my personal multisite network, which uses WP Super Cache. Both work fine.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic