Error after disabling sidebar

Forum
Last Post
Threads / Messages

Abronsyth

A Headache Embodied
Member
Joined
Aug 25, 2011
Messages
1,012
Points
36
Location
NY
Mysidian Dollar
73,285
Resolved

I tried to disable the login portion of the sidebar and I now have this error when visitng [mysite]/login:
Catchable fatal error: Argument 1 passed to GUIContainer::add() must be an instance of GUIComponent, null given, called in /home/inekelmy/public_html/view/loginview.php on line 19 and defined in /home/inekelmy/public_html/classes/class_guicontainer.php on line 361

Unfortunately I cannot login to enable the login bar to see if that fixes it. Anyone have an idea?

EDIT:
OK, I re-enabled it in PHPmyadmin, which fixed the issue...but I really don't want the login portion in the sidebar...how can I disable it without disabling the entire login system?
 
Last edited:
I no longer use the /login page (I have it redirecting to index, and have lines 19 and 20 entirely disabled, anyway). (See this mod, for why?) Your error is being thrown at these lines I no longer use whatsoever, and... (it's because you removed the function from the class_sidebar file, probably?)...

...well, bad news: The login form IS the same for both the /login page and the sidebar.

The login bar is added to the sidebar via the function getLoginBar, which calls the function setLoginBar, inside classes/class_sidebar.php, though getLoginBar is inevitably what's ALSO called in view/loginview.php.

You have a couple options: 1) This may not work, but it's worth a shot -- inside setLoginBar in class_sidebar, try removing the last line -
PHP:
$this->setDivision($this->loginBar);
See if the form still appears on /login but not on the sidebar... an error might be thrown? I dunno, I just think it might help.

2) You can go ahead and make your own login form inside the view/loginview.php instead of calling the one in the sidebar and add it in manually to the login page, if you want? Just reference the one being built in setLoginBar from the sidebar class file... or do it from scratch with html and make sure it posts data to "../../login" (up two levels just in case you're logging in from some bizarre page, I guess... or a full url would work, I guess).
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,122
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top