FOSSBilling \ Exception
Product not found FOSSBilling\Exception thrown with message "Product not found" Stacktrace: #7 FOSSBilling\Exception in /home/wowzahosting.com/public_html/app/modules/Product/Api/Guest.php:82 #6 Box\Mod\Product\Api\Guest:get in /home/wowzahosting.com/public_html/app/library/Api/Handler.php:104 #5 Api_Handler:__call in /home/wowzahosting.com/public_html/app/modules/Order/Controller/Client.php:44 #4 Box\Mod\Order\Controller\Client:get_configure_product_by_slug in [internal]:0 #3 ReflectionMethod:invokeArgs in /home/wowzahosting.com/public_html/app/library/Box/App.php:187 #2 Box_App:executeShared in /home/wowzahosting.com/public_html/app/library/Box/App.php:316 #1 Box_App:processRequest in /home/wowzahosting.com/public_html/app/library/Box/App.php:129 #0 Box_App:run in /home/wowzahosting.com/public_html/app/index.php:94
Stack frames (8)
7
FOSSBilling\Exception
/modules/Product/Api/Guest.php82
6
Box\Mod\Product\Api\Guest get
/library/Api/Handler.php104
5
Api_Handler __call
/modules/Order/Controller/Client.php44
4
Box\Mod\Order\Controller\Client get_configure_product_by_slug
[internal]0
3
ReflectionMethod invokeArgs
/library/Box/App.php187
2
Box_App executeShared
/library/Box/App.php316
1
Box_App processRequest
/library/Box/App.php129
0
Box_App run
/index.php94
/home/wowzahosting.com/public_html/app/modules/Product/Api/Guest.php
     * @throws \FOSSBilling\Exception
     */
    public function get($data)
    {
        if (!isset($data['id']) && !isset($data['slug'])) {
            throw new \FOSSBilling\Exception('Product ID or slug is missing');
        }
 
        $id = $data['id'] ?? null;
        $slug = $data['slug'] ?? null;
 
        $service = $this->getService();
        if ($id) {
            $model = $service->findOneActiveById($id);
        } else {
            $model = $service->findOneActiveBySlug($slug);
        }
 
        if (!$model instanceof \Model_Product) {
            throw new \FOSSBilling\Exception('Product not found');
        }
 
        return $service->toApiArray($model);
    }
 
    /**
     * Get paginated list of product categories.
     *
     * @return array
     */
    public function category_get_list($data)
    {
        $data['status'] = 'enabled';
        $service = $this->getService();
        [$sql, $params] = $service->getProductCategorySearchQuery($data);
        $per_page = $data['per_page'] ?? $this->di['pager']->getPer_page();
        $pager = $this->di['pager']->getAdvancedResultSet($sql, $params, $per_page);
        foreach ($pager['list'] as $key => $item) {
            $category = $this->di['db']->getExistingModelById('ProductCategory', $item['id'], 'Product category not found');
            $pager['list'][$key] = $this->getService()->toProductCategoryApiArray($category, true, $this->getIdentity());
Arguments
  1. "Product not found"
    
/home/wowzahosting.com/public_html/app/library/Api/Handler.php
        }
 
        $bb_mod = $this->di['mod']($mod);
 
        $api->setDi($this->di);
        $api->setMod($bb_mod);
        $api->setIdentity($this->identity);
        $api->setIp($this->di['request']->getClientAddress());
        if ($bb_mod->hasService()) {
            $api->setService($this->di['mod_service']($mod));
        }
 
        if (!method_exists($api, $method_name) || !is_callable([$api, $method_name])) {
            $reflector = new ReflectionClass($api);
            if (!$reflector->hasMethod('__call')) {
                throw new FOSSBilling\Exception(':type API call :method does not exist in module :module', [':type' => ucfirst($this->type), ':method' => $method_name, ':module' => $mod], 740);
            }
        }
 
        return $api->{$method_name}($arguments);
    }
}
 
/home/wowzahosting.com/public_html/app/modules/Order/Controller/Client.php
    }
 
    public function register(\Box_App &$app)
    {
        $app->get('/order', 'get_products', [], static::class);
        $app->get('/order/service', 'get_orders', [], static::class);
        $app->get('/order/:id', 'get_configure_product', ['id' => '[0-9]+'], static::class);
        $app->get('/order/:slug', 'get_configure_product_by_slug', ['slug' => '[a-z0-9-]+'], static::class);
        $app->get('/order/service/manage/:id', 'get_order', ['id' => '[0-9]+'], static::class);
    }
 
    public function get_products(\Box_App $app)
    {
        return $app->render('mod_order_index');
    }
 
    public function get_configure_product_by_slug(\Box_App $app, $slug)
    {
        $api = $this->di['api_guest'];
        $product = $api->product_get(['slug' => $slug]);
        $tpl = 'mod_service' . $product['type'] . '_order';
        if ($api->system_template_exists(['file' => $tpl . '.html.twig'])) {
            return $app->render($tpl, ['product' => $product]);
        }
 
        return $app->render('mod_order_product', ['product' => $product]);
    }
 
    public function get_configure_product(\Box_App $app, $id)
    {
        $api = $this->di['api_guest'];
        $product = $api->product_get(['id' => $id]);
        $tpl = 'mod_service' . $product['type'] . '_order';
        if ($api->system_template_exists(['file' => $tpl . '.html.twig'])) {
            return $app->render($tpl, ['product' => $product]);
        }
 
        return $app->render('mod_order_product', ['product' => $product]);
    }
 
[internal]
/home/wowzahosting.com/public_html/app/library/Box/App.php
    {
        $this->debugBar['time']->startMeasure('executeShared', 'Reflecting module controller (shared mapping)');
        $class = new $classname();
        if ($class instanceof InjectionAwareInterface) {
            $class->setDi($this->di);
        }
        $reflection = new ReflectionMethod($class::class, $methodName);
        $args = [];
        $args[] = $this; // first param always app instance
 
        foreach ($reflection->getParameters() as $param) {
            if (isset($params[$param->name])) {
                $args[$param->name] = $params[$param->name];
            } elseif ($param->isDefaultValueAvailable()) {
                $args[$param->name] = $param->getDefaultValue();
            }
        }
        $this->debugBar['time']->stopMeasure('executeShared');
 
        return $reflection->invokeArgs($class, $args);
    }
 
    protected function execute($methodName, $params, $classname = null): string
    {
        $this->debugBar['time']->startMeasure('execute', 'Reflecting module controller');
 
        $reflection = new ReflectionMethod(static::class, $methodName);
        $args = [];
 
        foreach ($reflection->getParameters() as $param) {
            if (isset($params[$param->name])) {
                $args[$param->name] = $params[$param->name];
            } elseif ($param->isDefaultValueAvailable()) {
                $args[$param->name] = $param->getDefaultValue();
            }
        }
 
        $this->debugBar['time']->stopMeasure('execute');
 
        return $reflection->invokeArgs($this, $args);
/home/wowzahosting.com/public_html/app/library/Box/App.php
                    $exc = new FOSSBilling\InformationException('The system is undergoing maintenance. Please try again later', [], 503);
                    $apiController = new Box\Mod\Api\Controller\Client();
                    $apiController->setDi($this->di);
 
                    return $apiController->renderJson(null, $exc);
                } else {
                    return $this->render('mod_system_maintenance');
                }
            }
        }
 
        $this->debugBar['time']->startMeasure('sharedMapping', 'Checking shared mappings');
        $sharedCount = count($this->shared);
        for ($i = 0; $i < $sharedCount; ++$i) {
            $mapping = $this->shared[$i];
            $url = new Box_UrlHelper($mapping[0], $mapping[1], $mapping[3], $this->url);
            if ($url->match) {
                $this->debugBar['time']->stopMeasure('sharedMapping');
 
                return $this->executeShared($mapping[4], $mapping[2], $url->params);
            }
        }
        $this->debugBar['time']->stopMeasure('sharedMapping');
 
        // this class mappings
        $this->debugBar['time']->startMeasure('mapping', 'Checking mappings');
        $mappingsCount = count($this->mappings);
        for ($i = 0; $i < $mappingsCount; ++$i) {
            $mapping = $this->mappings[$i];
            $url = new Box_UrlHelper($mapping[0], $mapping[1], $mapping[3], $this->url);
            if ($url->match) {
                $this->debugBar['time']->stopMeasure('mapping');
 
                return $this->execute($mapping[2], $url->params);
            }
        }
        $this->debugBar['time']->stopMeasure('mapping');
 
        $e = new FOSSBilling\InformationException('Page :url not found', [':url' => $this->url], 404);
 
/home/wowzahosting.com/public_html/app/library/Box/App.php
    public function delete(string $url, string $methodName, ?array $conditions = [], string $class = null): void
    {
        $this->event('delete', $url, $methodName, $conditions, $class);
    }
 
    public function run(): string
    {
        $this->debugBar['time']->startMeasure('registerModule', 'Registering module routes');
        $this->registerModule();
        $this->debugBar['time']->stopMeasure('registerModule');
 
        $this->debugBar['time']->startMeasure('init', 'Initializing the app');
        $this->init();
        $this->debugBar['time']->stopMeasure('init');
 
        $this->debugBar['time']->startMeasure('checkperm', 'Checking access to module');
        $this->checkPermission();
        $this->debugBar['time']->stopMeasure('checkperm');
 
        return $this->processRequest();
    }
 
    /**
     * @param string $path
     */
    public function redirect($path): never
    {
        $location = $this->di['url']->link($path);
        header("Location: $location");
        exit;
    }
 
    public function render($fileName, $variableArray = []): string
    {
        return 'Rendering ' . $fileName;
    }
 
    public function sendFile($filename, $contentType, $path): false|int
    {
        header("Content-type: $contentType");
/home/wowzahosting.com/public_html/app/index.php
 
// If HTTP error code has been passed, handle it.
if (!is_null($http_err_code)) {
    switch ($http_err_code) {
        case '404':
            $e = new FOSSBilling\Exception('Page :url not found', [':url' => $url], 404);
            echo $app->show404($e);
 
            break;
        default:
            $http_err_code = intval($http_err_code);
            http_response_code($http_err_code);
            $e = new FOSSBilling\Exception('HTTP Error :err_code occurred while attempting to load :url', [':err_code' => $http_err_code, ':url' => $url], $http_err_code);
            echo $app->render('error', ['exception' => $e]);
    }
    exit;
}
 
// If no HTTP error passed, run the app.
echo $app->run();
exit;
 

Environment & details:

Key Value
PHP Version
"8.3.15"
Error code
0
Instance ID
"e086f6af-ec56-43df-9336-7bd0493ea3c2"
Key Value
_url
"/order/super-bundle-4"
empty
empty
empty
empty
Key Value
PATH
"/bin:/usr/bin"
HTTP_ACCEPT
"*/*"
HTTP_ACCEPT_ENCODING
"gzip, br, zstd, deflate"
HTTP_HOST
"app.wowzahosting.com"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
DOCUMENT_ROOT
"/home/wowzahosting.com/public_html/app"
REMOTE_ADDR
"18.119.139.90"
REMOTE_PORT
"58599"
SERVER_ADDR
"154.53.39.8"
SERVER_NAME
"app.wowzahosting.com"
SERVER_ADMIN
"supports@wowzahosting.com"
SERVER_PORT
"443"
REQUEST_URI
"/order/super-bundle-4"
REDIRECT_URL
"/order/super-bundle-4"
HTTPS
"on"
HTTP_AUTHORIZATION
""
REDIRECT_STATUS
"200"
X_SPDY
"HTTP2"
SSL_PROTOCOL
"TLSv1.3"
SSL_CIPHER
"TLS_AES_256_GCM_SHA384"
SSL_CIPHER_USEKEYSIZE
"256"
SSL_CIPHER_ALGKEYSIZE
"256"
LSWS_EDITION
"Openlitespeed 1.8.2"
X-LSCACHE
"on,crawler"
SCRIPT_FILENAME
"/home/wowzahosting.com/public_html/app/index.php"
QUERY_STRING
"_url=/order/super-bundle-4"
SCRIPT_NAME
"/index.php"
SERVER_PROTOCOL
"HTTP/1.1"
SERVER_SOFTWARE
"LiteSpeed"
REQUEST_METHOD
"GET"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1736937965.4496
REQUEST_TIME
1736937965
empty
0. Whoops\Handler\PrettyPageHandler