Adam K M
Active member
Hello,
I'm trying to properly extend an already existing controller (account), but when I try to save the code event listener, I get the following error:

The Invalid class error isn't very descriptive, and I'm not quite sure what to do with it. Testing some classes that didn't exist, I also got the same error, so I suspect that XenForo is unable to locate my controller, but I have been unable to pinpoint where I've gone wrong with the naming/folder organisation .
Here is the setup that I've currently got running on my development forum
My LoadClassController
	
	
	
		
The directory:
	
	
	
		
Any / All advice on what's going wrong is greatly appreciated. As for my guildpage class, it works properly (hooray!) if I insert it directly in the ControllerPublic_Account class (boo! bad practice!).
				
			I'm trying to properly extend an already existing controller (account), but when I try to save the code event listener, I get the following error:

The Invalid class error isn't very descriptive, and I'm not quite sure what to do with it. Testing some classes that didn't exist, I also got the same error, so I suspect that XenForo is unable to locate my controller, but I have been unable to pinpoint where I've gone wrong with the naming/folder organisation .
Here is the setup that I've currently got running on my development forum
My LoadClassController
		PHP:
	
	<?php
class ShortCut_GuidArea_LoadClassController
{
    /**
     * Instruct the system that XenForo_ControllerPublic_Account
     * should be extended by our own class
     *
     * @param string $class
     * @param array $extend
     */
    public static function extendMemberController($class, array &$extend)
    {
        if ($class == 'XenForo_ControllerPublic_Account')
        {
            $extend[] = 'ShortCut_GuildArea_guildpage';
        }
    }
}
	
		Code:
	
	/public_html/dev*/library/ShortCut/GuildArea
* corresponds to the root of the installation.
	Any / All advice on what's going wrong is greatly appreciated. As for my guildpage class, it works properly (hooray!) if I insert it directly in the ControllerPublic_Account class (boo! bad practice!).