WordPress.org

Ready to get started?Download WordPress

Forums

Code Snippets
[resolved] Can't add new (6 posts)

  1. another-webmaster
    Member
    Posted 2 years ago #

    Do I have to cmod some file or folder because of following msg after clicking "Add new" ?

    You do not have sufficient permissions to access this page

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

  2. Shea Bunge
    Member
    Plugin Author

    Posted 2 years ago #

    No, that problem would have nothing to do with cmod-ing anything. You are most likely trying at access a page that doesn't exist or you are not logged in as an administrator. Can you tell me which link you clicked and where the link was? Also check that you were logged in as an administrator account.

  3. another-webmaster
    Member
    Posted 2 years ago #

    Hi Shea

    I found the reason for the problem.
    Having following in wp-config.php which is/was the reason for the error.
    define('DISALLOW_FILE_EDIT',true);
    As long it has "false" in wp-config it allows me to edit..ugh...so I add new snippets and afterwards I changed it in "true" and all works like a charm. (not the best soltuion but works)

  4. another-webmaster
    Member
    Posted 2 years ago #

    Little note to above:
    Found this after having the error above: please read.
    As they mentioned to solve a same kind off problem with Quick Cache, I also modified the file: code-snippets.php line 114 (edit_plugins into add_users)and now it is fine even with settings on true in wp-config.
    My question to you Shea, can/does this interfere/harm or is this the solution as it also? If so, please update your amasing nice plugin so otheres won't have a same issue as I had.

  5. Shea Bunge
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,
    Thanks for finding out the problem. I don't have DISALLOW_FILE_EDIT set to true, so I didn't know what was going wrong.

    I will be releasing an updated version of the plugin that will address this bug and a few other small improvements.

    You could, as you mentioned above, change the permission to add_users (which is absolutely fine as they are both administrator roles), but the Code Snippets plugin has nothing to do with adding users, so a better role to change it to would be install_plugins.

    Now, my question to you is: If you don't want users editing plugins, do you really want them adding snippets, which are essentially mini-plugins?

  6. another-webmaster
    Member
    Posted 2 years ago #

    @Shea

    Now, my question to you is: If you don't want users editing plugins, do you really want them adding snippets, which are essentially mini-plugins?

    The snippets won't be visible for our Editor and the authors (hiding it within a code also) I/we had all the collected code in the mu-folder but this way it's much better to work with. (thats why I like your plugin)

    so a better role to change it to would be install_plugins

    So if I understand and read well, the better solution is to change edit_plugins into install_plugins.Will do now.

    Thanks for your all your time and effort and last but not least for your great plugin!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.