I have a custom module on magento 2.4.5. It shows an error when i run setup di compile command
`bin/magento setup:di:compile Compilation was started. Repositories code generation... 1/9 [=>-------------] 11% 1 sec 115.0 MiBClass "Magento\Framework\View\Element\Html\Text" not found#0 /home/966482.cloudwaysapps.com/txemqwraum/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(136): require_once() #1 /home/966482.cloudwaysapps.com/txemqwraum/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass() #2 /home/966482.cloudwaysapps.com/txemqwraum/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract() #3 /home/966482.cloudwaysapps.com/txemqwraum/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList() #4 /home/966482.cloudwaysapps.com/txemqwraum/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator->doOperation() #5 /home/966482.cloudwaysapps.com/txemqwraum/public_html/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): Magento\Setup\Module\Di\App\Task\Manager->process() #6 /home/966482.cloudwaysapps.com/txemqwraum/public_html/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\DiCompileCommand->execute() #7 /home/966482.cloudwaysapps.com/txemqwraum/public_html/vendor/symfony/console/Application.php(1021): Symfony\Component\Console\Command\Command->run() #8 /home/966482.cloudwaysapps.com/txemqwraum/public_html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand() #9 /home/966482.cloudwaysapps.com/txemqwraum/public_html/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun() #10 /home/966482.cloudwaysapps.com/txemqwraum/public_html/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun() #11 /home/966482.cloudwaysapps.com/txemqwraum/public_html/bin/magento(23): Symfony\Component\Console\Application->run() #12 {main}
Wgen i login to admin it shows below error
`1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid Document Element 'add': Character content is not allowed, because the content type is empty. Line: 4
Element 'add': Element content is not allowed, because the content type is empty. Line: 4
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid Document Element 'add': Character content is not allowed, because the content type is empty. Line: 4
Element 'add': Element content is not allowed, because the content type is empty. Line: 4
#1 Magento\Framework\Config\Reader\Filesystem->read() called at [vendor/magento/module-backend/Model/Menu/Config.php:149] #2 Magento\Backend\Model\Menu\Config->_initMenu() called at [vendor/magento/module-backend/Model/Menu/Config.php:116] #3 Magento\Backend\Model\Menu\Config->getMenu() called at [vendor/magento/module-backend/Model/Url.php:365] #4 Magento\Backend\Model\Url->_getMenu() called at [vendor/magento/module-backend/Model/Url.php:325] #5 Magento\Backend\Model\Url->getStartupPageUrl() called at [vendor/magento/module-backend/App/AbstractAction.php:187] #6 Magento\Backend\App\AbstractAction->_processUrlKeys() called at [generated/code/Magento/Backend/Controller/Adminhtml/Index/Index/Interceptor.php:41] #7 Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->_processUrlKeys() called at [vendor/magento/module-backend/App/Request/BackendValidator.php:175] #8 Magento\Backend\App\Request\BackendValidator->validate() called at [vendor/magento/framework/App/Request/CompositeValidator.php:40] #9 Magento\Framework\App\Request\CompositeValidator->validate() called at [vendor/magento/framework/App/FrontController.php:192] #10 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:147] #11 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58] #12 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #13 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #14 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:23] #15 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116] #16 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23] #17 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:264] #18 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:30]`
Im unable to figure out which file is causing error
I have tried editing my menu.xml. here is the code
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd"> <menu> <add id="Msgclub_Sms::msgclub" title="Msgclub" module="Msgclub_Sms" sortOrder="999" resource="Magento_Backend::content"> <argument name="module" xsi:type="string">Msgclub_Sms</argument> <resource>Msgclub_Sms::msgclub</resource> <children> <add id="Msgclub_Sms::otp" title="OTP" module="Msgclub_Sms" sortOrder="10" action="adminhtml/system_config/edit/section/msgclub_sms_otp" resource="Msgclub_Sms::otp"/> <add id="Msgclub_Sms::notifications" title="SMS Notifications" module="Msgclub_Sms" sortOrder="20" action="adminhtml/system_config/edit/section/msgclub_sms_notifications" resource="Msgclub_Sms::notifications"/> <add id="Msgclub_Sms::provider_settings" title="Provider Settings" module="Msgclub_Sms" sortOrder="30" action="adminhtml/system_config/edit/section/msgclub_sms_provider" resource="Msgclub_Sms::provider_settings"/> <add id="Msgclub_Sms::test_settings" title="Test SMS Settings" module="Msgclub_Sms" sortOrder="40" action="adminhtml/system_config/edit/section/msgclub_sms_test" resource="Msgclub_Sms::test_settings"/> </children> </add> </menu> </config>