[Fixed] Call to a member function isLoggedIn() on null

Permalink 2 users found helpful
Hello all,

So I happen to be experiencing a critical error on my concrete5 v8.0.3 site. On every page, except the login/admin pages and the homepage, it shows an error - "Call to a member function isLoggedIn() on null." The page does not display. This is a critical error and not a single page with this issue will load, causing massive issues.

Please help me if you can. I did some research and couldn't find anyone with the issue. It started just after updating to 8.0.3.

Thanks in advance!

zaneweb
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi zaneweb,

What is the address of your website?

What theme are you using?

Are you using any custom code?
zaneweb replied on at Permalink Reply
zaneweb
Sorry I forgot to clarify!

My website address ishttp://zaneweb.org

I am running the Stucco theme

I do not have any custom code except changing the footer text in the theme's footer.php file. I doubt that will affect it, however.

Thanks in advance!
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
@zaneweb

There are three issues I am aware of with the Stucco theme and concrete5 v8.

Here are the issues and links to instructions to fix them:

Call to a member function getTreeNodeTypeClass() on null
Call to a member function isLoggedIn() on null
http://www.concrete5.org/community/forums/themes/error-call-to-unde...

Call to undefined method Concrete\Core\File\Image\Thumbnail\Type\Type::setName()
http://www.concrete5.org/community/forums/themes/error-call-to-unde...

I have contacted the theme author
zaneweb replied on at Permalink Reply
zaneweb
Thank you so much! I managed to fix the site with your help.

To anyone reviewing this thread, here are the instructions I followed to fix the site.

According to this page (https://www.concrete5.org/community/forums/themes/error-call-to-undefined-method-concretecorefileimagethumbnailtyp/#861110), I went to line 32 of packages\theme_stucco\themes\stucco\inc\header.php, and changed this line:

<div class="global-navi<?php   global $u; if ( $u -> isLoggedIn() ) { echo ' login'; } ?>">

to
<div class="global-navi<?php $u = new User(); if ($u -> isLoggedIn()) { echo ' login'; } ?>">

That fixed my issue! Thank you @MrKDilkington!