Jump to content

Oops! Something went wrong and we couldn't process your request.


Hectorv

Recommended Posts

Utilizó un gancho para ocultar algunos elementos 

use WHMCS \ View \ Menu \ Item como MenuItem;

add_hook ('ClientAreaSecondarySidebar', 1, function (MenuItem $ secundariaSidebar)
{
    $ secondarySidebar-> getChild ('Soporte')
        -> removeChild ('Descargas');
});

add_hook ('ClientAreaSecondarySidebar', 1, function (MenuItem $ secundariaSidebar)
{
    $ secundariaSidebar-> getChild ('Support')
        -> removeChild ('Network Status');
});

add_hook ('ClientAreaSecondarySidebar', 1, function (MenuItem $ secundariaSidebar)
{
    $ secundariaSidebar-> getChild ('Support')
        -> removeChild ('Announcements');
});

add_hook ('ClientAreaPrimaryNavbar', 1, function (MenuItem $ primaryNavbar)
{
    $ primaryNavbar-> removeChild ('Estado de la red');
});

 

cuando estoy en la pagina de area de clientes funciona todo pero al ir a otra pagina genera el erro 

 

¡Ups!

Se produjo un error y no pudimos procesar su solicitud.

Vuelva a la página anterior y vuelva a intentarlo.

For additional assistance, please reference the WHMCS TroubleShooting Guide »

Error: Call to a member function removeChild() on null in /home/agenciavimos/public_html/clientes/includes/hooks/example.php:41
Stack trace:
#0 /home/agenciavimos/public_html/clientes/vendor/whmcs/whmcs-foundation/lib/Hook/Manager.php(0): WHMCS\Utility\SafeInclude::{closure}(Object(WHMCS\View\Menu\Item))
#1 /home/agenciavimos/public_html/clientes/vendor/illuminate/support/Facades/Facade.php(261): WHMCS\Hook\Manager->run('ClientAreaSecon...', Array, true)
#2 /home/agenciavimos/public_html/clientes/includes/functions.php(0): Illuminate\Support\Facades\Facade::__callStatic('run', Array)
#3 /home/agenciavimos/public_html/clientes/vendor/whmcs/whmcs-foundation/lib/ClientArea.php(0): run_hook('ClientAreaSecon...', Array, true)
#4 /home/agenciavimos/public_html/clientes/vendor/whmcs/whmcs-foundation/lib/ClientArea.php(0): WHMCS\ClientArea->outputWithoutExit()
#5 /home/agenciavimos/public_html/clientes/vendor/whmcs/whmcs-foundation/lib/Http/Message/AbstractViewableResponse.php(0): WHMCS\ClientArea->getOutputContent()
#6 /home/agenciavimos/public_html/clientes/vendor/middlewares/utils/src/CallableHandler.php(39): WHMCS\Http\Message\AbstractViewableResponse->getBody()
#7 /home/agenciavimos/public_html/clientes/vendor/middlewares/fast-route/src/FastRoute.php(96): Middlewares\Utils\CallableHandler::execute(Array, Array)
#8 /home/agenciavimos/public_html/clientes/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/HandleProcessor.php(0): Middlewares\FastRoute->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#9 /home/agenciavimos/public_html/clientes/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\HandleProcessor->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#10 /home/agenciavimos/public_html/clientes/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\HandleProcessor->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#11 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#12 /home/agenciavimos/public_html/clientes/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#13 /home/agenciavimos/public_html/clientes/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#14 /home/agenciavimos/public_html/clientes/vendor/whmcs/whmcs-foundation/lib/Security/Middleware/Authorization.php(0): WHMCS\Security\Middleware\Authorization->delegateProcess(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#15 /home/agenciavimos/public_html/clientes/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/AbstractProxyMiddleware.php(0): WHMCS\Security\Middleware\Authorization->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#16 /home/agenciavimos/public_html/clientes/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\AbstractProxyMiddleware->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#17 /home/agenciavimos/public_html/clientes/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\AbstractProxyMiddleware->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated