Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Video User Manuals

    (@videousermanuals)

    Hi,

    Can you please turn on debugging and see what error is appear and let us know.

    Thanks

    Thread Starter gvaslin

    (@gvaslin)

    Sorry to be so long to answer but I was in holiday…

    Here is the debug message :

    in wp-includes/functions.php on line 3508 Fatal error: Call to a member function remove_cap() on a non-object in wp-content/plugins/white-label-cms/wlcms-plugin.php on line 814

    Thanks for your help !

    This problem appear because you probably removed role “editor”, if yes you will need to add additional validation “if role exists” in all cases where the statement $role = get_role(‘editor’) appears.
    f.e.

    if ($_REQUEST['wlcms_o_editor_template_access'] == "1") {
            $role = get_role('editor');
            if ($role) {
                $role->add_cap('edit_theme_options');
            }
        } elseif ($_REQUEST['wlcms_o_editor_template_access'] == "0") {
            $role = get_role('editor');
            if ($role) {
                $role->remove_cap('switch_themes'); // Legacy
                $role->remove_cap('edit_themes'); // Legacy
                $role->remove_cap('edit_theme_options');
            }
        }

    Thread Starter gvaslin

    (@gvaslin)

    Exact, I’ve removed the editor role.
    Where do I have to add the code you gave up ?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘White page when "save changes"’ is closed to new replies.