Forums | Mahara Community

Support /
Profile page error after login


Patric Lougheed's profile picture
Posts: 97

24 June 2020, 9:30

One user profile page, which displays fine when not logged in, throws error after logging in. All I get in the logs is:

[WAR] f9 (lib/errors.php:536) [Error]: Class 'Institution' not found
Call stack (most recent first):
   * exception(object(Error)) at Unknown:0

This is in Mahara 19.10.3

Robert Lyon's profile picture
Posts: 773

24 June 2020, 11:56

Hi Patric,

It sounds like the htdocs/lib/institution.php file is not being included in the flow of code for that page for that user.

So this is only happening for the one user?

It sounds like there is something on their profile page that is wanting to use the Institution class but hasn't included the institution.php file causing the error when logged in.

Can you let me know what content is on the logged out version of the page?

Doing a view source of the page and looking for strings starting with 'bt-' will show what blocks are on the page

Cheers

Robert

Patric Lougheed's profile picture
Posts: 97

24 June 2020, 18:18

Thanks Robert,

Looked at the source and the eight blocks were what you would expect to find. So, I just started deleting blocks until I found the issue. The collection chosen for one of the blocks did not have any permissions set yet so it caused the issue. I would think that a collection with no permissions would not be selectable or even show up on the list to pick. I would consider this a bug or at least a problem with the logic.

Robert Lyon's profile picture
Posts: 773

26 June 2020, 9:30

Hi Patric,

This does sound like a bug - I tried to replicate but couldn't.

I noticed however that on a fresh install there were only 5 block on a profile page, called 'About me', 'My friends', 'My portfolios', 'Wall', and 'My groups'

Was the offending block one of these or was it another block type?

Cheers

Robert

Patric Lougheed's profile picture
Posts: 97

26 June 2020, 10:10

It was the Navigation block. The user selected a collection that had no permissions set. 

Robert Lyon's profile picture
Posts: 773

26 June 2020, 12:34

Hi Patric,

Thank you for that - yep I now can replicate the problem and have made a patch to fix it

https://bugs.launchpad.net/mahara/+bug/1885231

Even though the collection is currently not shared the navigation block should still display the links but on following them you should get the 'access denied' screen. Because when the navigation block was added to profile page the collection may have been shared and then access removed later.

Cheers

Robert

 

6 results