Support » Plugin: Custom Blocks Constructor - Lazy Blocks » Permission error when accessing plugin’s admin pages

  • Resolved David Decker


    Hi there,

    I wanted to try out your plugin, however, whenever I try to go to one of these admin pages:
    – “Blocks”
    – “Add New”
    – “Templates”
    I get an permission error – cannot access. Really strange.
    Tried this on various installs (local, live etc.) and always the same.

    The only page I can access is “Tools”.

    Would be nice if you could fix this soon so I can really try it out.

    Note: Gutenberg was installed and active on the installs I tried it (latest version 3.5.0).

    Thanks a lot!
    -Dave 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author nK


    Hi Dave.

    Strange, just tested on local and live servers and it is working 🙂

    I had an assumption why this could happen, so I updated some the code in 1.0.1 version. Please, try it and let me know.

    Regards, nK.

    Thread Starter David Decker



    Thanks for your reply!

    I am sorry, but it does still not work.
    I looked at your code, and the issue is easy to solve:
    in your post type registering completely remove the “capabilities” key/array – then it automatically inherits the permissions from the “post” post type. You can also set another one, by using “capability_type” (default is “post”). See:

    Just delete “capabilities” in class-blocks.php and class-templates.php — I did this locally in my install and now everything working like a charm, no issues anymore.

    Thanks in advance! 🙂

    • This reply was modified 4 years, 1 month ago by David Decker.
    Plugin Author nK


    Which Role does your account have? Your account should be able to edit lazyblocks posts.

    User Role

    I have used custom capabilities in other plugins and never have an issue with it. If your role doesn’t support editing of LazyBlocks, you can add these capabilities using “User Role Editor” plugin.

    • This reply was modified 4 years, 1 month ago by nK.
    Thread Starter David Decker


    Of course I am the admin (role: administrator) in all my installs – I want to use your plugin but not install any User Role Manager or whatever. It should just work by default in my opinion. I do nothing special on my install(s). Pure default stuff. Obviously something is wrong. Sorry to report that, it is nothing “personal” or whatever.

    To test further, I just did a new empty install – only Gutenberg and your Lazy Blocks plugin – nothing else:
    with your v1.0.1 I cannot even see any other sub menu than “Tools”
    with v1.0.0 I could already see “Lazy Blocks”, “Add New”, “Templates” – but not access.

    See screenshot of the test install from just now:

    Obviously there is an issue.

    When removing the capabilities from the post type declaration everything works.

    Thanks again, Dave 🙂

    Plugin Author nK


    Thank you for help, Dave!

    All my test servers were Multisite and the plugin works fine, I just needed to use default WordPress installation without multisite enabled to see the bug 🙁

    Finally fixed in 1.0.2

    Regards, nK.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Permission error when accessing plugin’s admin pages’ is closed to new replies.