-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: Class 'WHMCS\Module\Addon\AddonModule\Admin\AdminDispatcher' not found #5
Comments
Hi, In the lib folder, you need to rename the namespaces in all the files. namespace WHMCS\Module\Addon\AddonModule\Client; AddonModule needs to be renamed to the same as the addon folder you have created. |
Hi, I installed whmcs on Xampp. |
Hi DS, In addonmodule.php, use WHMCS\Module\Addon\addonmodule\Admin\AdminDispatcher; |
Yes, I renamed that names but has errors not found class. |
This is issue could be resolved if you change all your classes like:
or you change the module path like:
Note that capital letters are matching the first letter after underscore. Check how works this example: https://docs.whmcs.com/Module_Class_Autoloading |
In whmcs v7.1.2 , addonmodule.php on line 222 can't found class AdminDispatcher , and here is the solution , for more detail , plz contact me
I also encountered this problem while playing with the sample code of the addon module.
and in
|
You can use vendor/autoload.php, and use namespace for all class in lib directory |
Yep the documentation in the demo module is clear: /**
* Require any libraries needed for the module to function.
* require_once __DIR__ . '/path/to/library/loader.php';
*
* Also, perform any initialization required by the service's library.
*/ |
Hello, i try to test Sample Addon Module and meet this problem in my online server,
but in localhost, everything is ok.
How can i fix this problem.
Fatal error: Class 'WHMCS\Module\Addon\AddonModule\Admin\AdminDispatcher' not found in .../modules/addons/addonmodule/addonmodule.php on line 222
This is my server information
OS
Apache
MySQL
PHP
The text was updated successfully, but these errors were encountered: