Hi, check log files
Symfony\Component\HttpKernel\Exception\HttpException
Hi,
I'm getting this error on my website : Symfony\Component\HttpKernel\Exception\HttpException & here is a link to the website : https://buynow.liqstage.co.za
Any help or input would be mush appreciated.
Thanks.
You get this exception when the csrf token is not correct or missing.
You are catching a generic Exception in the FrontendCategoriesViewComposer and aborting with a 500 status code whenever you are trying to assign to $brandsCategoriesProductsRetailers
try {
$brandsCategoriesProductsRetailersModel = new BrandCategoryProductRetailerView();
$brandsCategoriesProductsRetailers = $brandsCategoriesProductsRetailersModel->getAllActiveByCountry();
} catch (Exception $e) {
Log::channel('buynow')->error($e);
abort(500);
}
Check your logs for the detail of the exception. Maybe try to handle this more gracefully, there is little benefit to a hard abort here
Here is some log file output :
#52 /web/sites/buynow.liqstage.co.za/src/vendor/fruitcake/laravel-cors/src/HandleCors.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #53 /web/sites/buynow.liqstage.co.za/src/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure)) #54 /web/sites/buynow.liqstage.co.za/src/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #55 /web/sites/buynow.liqstage.co.za/src/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure)) #56 /web/sites/buynow.liqstage.co.za/src/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #57 /web/sites/buynow.liqstage.co.za/src/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(140): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #58 /web/sites/buynow.liqstage.co.za/src/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(109): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request)) #59 /web/sites/buynow.liqstage.co.za/src/public/index.php(57): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #60 {main} "}
Nothing of value there.
Thought so, will revert back once I have more feedback.
Just rethrow the exception.
// ...
} catch (Exception $e) {
Log::channel('buynow')->error($e);
throw($e);
}
Did you recently upgrade. If so what ver to what ver.
@tykus Added the line but Just more errors :(
@jlrdw no update done recently. Current version is "Laravel Framework 7.28.3"
Yes, but a better exception message
General error: 1615 Prepared statement needs to be re-prepared (SQL: select * from `brands_categories_products_retailers_view` where (`brand_is_active` = 1 and `product_is_active` = 1 and `retailer_is_active` = 1 and `retailer_country_id` = 161) order by `brand_order` asc, `brand_name` asc, `product_name` asc)
The solution to the problem however is not so easy, you are on a shared hosting r do you actually have prepared statements yourself?
@tykus Do you see that error somewhere? Or code?
Please or to participate in this conversation.