Jump to content

Error 500 after moving a page into admin and accessing it as non-superadmin


ceberlin
 Share

Recommended Posts

What I did:

Right now an editor (who is not a superuser) only sees PAGES and ACCESS.

I thought I move a page into admin which has all rights set for any editor.

This NOTIFICATION page should be accessible in the black admin menu.

The purpose is to give the editors some statistics and notes.

What happened:

Obviously this is an unintended setup. When calling the file as non-superadmin, i get an error 500.

Error: Call to a member function has() on a non-object (line 50 of /xxxxxxxx/wire/core/Role.php)

I there anything I can do to fix this?

Link to comment
Share on other sites

I'm guessing you are on the dev branch? There is a bug. I'll update the branch here soon (have to test some other stuff), but if you are on the dev branch and want to fix, here is a patch for file /wire/modules/Fieldtype/FieldtypePage.module. You'll want to replace the "-" line with the "+" line below: 

@@ -223,7 +226,7 @@ class FieldtypePage extends FieldtypeMulti {
         *
         */
        public function ___formatValue(Page $page, Field $field, $value) {
-               if($page->editable() || !$field->allowUnpub) return $value; 
+               if($field->allowUnpub) return $value; 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...