Details
Description
Under the client area, Domains page (/plugin/domains/client_main/) domains are shown by default for the "Active" status. Clicking on any of the other statuses, including Pending, Suspended, Deleted, do not load domains of that status and result in the following error:
[2022-06-06T15:36:07.126138+00:00] general.ERROR: Exception in /home/blestacp/public_html/app/app_controller.php:0 Stack trace: #0 /home/blestacp/public_html/plugins/domains/domains_controller.php(15): AppController->preAction() #1 /home/blestacp/public_html/plugins/domains/controllers/client_main.php(16): DomainsController->preAction() #2 /home/blestacp/public_html/vendors/minphp/bridge/src/Lib/Dispatcher.php(133): ClientMain->preAction() #3 /home/blestacp/public_html/index.php(21): Dispatcher::dispatch('/plugin/domains...') #4
{main}Testing with PHP 7.4 on Blesta 5.4.1
Okay, the issue is caused by overlapping action URLs in the Domain Manager plugin. The navigation URL is /plugins/domains/client_main/ and the widget url is /plugins/domains/client_main/index/. These map to the same controller and method. Because of this, if the widget action is disabled URLs containing /plugins/domains/client_main/index/ will be redirected to a 404. The status tabs on domains page are /plugins/domains/client_main/index/[status] so we get this 404.
The solution will be to change the widget action URL to something like client_main/widget instead of client_main/index and then create a widget() method in the controller which just calls index.
We'll need to be sure the widget status tabs also link to /widget.