• After installing H5P plugin on WordPress, the submenu link of “Content” under H5P menu on admin is not shown at all. The only submenus that appears are: “New” and “Libraries”.

    I can upload new H5P library file but after I try create new content it forward to a a blank page of WordPress with the error: “Sorry, You Are Not Allowed to Access This Page”.

    There are not any errors on logs of PHP and all is okay with the database as I checked. The users capabilities are set for administrator as needed.

    I also make sure that there is no any conflict with any plugin or theme. Any ideas what cause it?

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

    (@icc0rz)

    Are you getting this with for a fresh installation of WordPress as well? Most likely there are some customizations made to the WP Admin pages that are causing this.

    Thread Starter Yossi Aharon

    (@yossiaharon)

    With fresh installation of WordPress seems that all is working fine.

    What can cause this problem? There is no any special modifications of the admin area. I tried to login from another username with admin capabilities but the same problem appear.

    Plugin Author icc0rz

    (@icc0rz)

    Are you able to check if the current user/role has the ‘view_h5p_contents’ permission?

    Also, are you able to access /wp-admin/admin.php?page=h5p on your site? If so it’s just the visual link in the menu that is broken.

    Apart from that have you done any custom coding to your site or theme, or changed the permission system in any way?

    Thread Starter Yossi Aharon

    (@yossiaharon)

    It seems that the plugin not added the needed permission for the administrator user.

    I’m not able to access /wp-admin/admin.php?page=h5p it shows me the error “Sorry, you are not allowed to access this page”.

    How I can add manually to the database (without a plugin) the needed user roles? Seems that also in a clean WordPress installation nothing added to wp_capabilities field in database.

    Plugin Author icc0rz

    (@icc0rz)

    The new capabilities are assigned to all roles using the default capabilities in WP. You can see which here: https://github.com/h5p/h5p-wordpress-plugin/blob/1b4b8b661f7de667af543b7d9a3169efe85aa253/public/class-h5p-plugin.php#L665
    If they are not mapped it could be that the default system is somehow changed.

    You can force this to run again by adding self::assign_capabilities() right here: https://github.com/h5p/h5p-wordpress-plugin/blob/1b4b8b661f7de667af543b7d9a3169efe85aa253/public/class-h5p-plugin.php#L153
    and then deactivated and active the plugin again.

    There are also some capability / role permissions plugins you can use to map this manually in the UI.
    But it would be interesting to find out why they didn’t get mapped correctly.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Content not shown, no access to this page error’ is closed to new replies.