I am using Magento 2.3 CE on ubuntu 18 with SM Moonlight theme, the issue is when I search any product it shows suggested products but without loading CSS and template. Here is the image for view https://imgur.com/a/kIlDbfM It also shows 500 (Internal Server Error) on the search result page.
Check if there's a permission issue with var and pub/static folder. Please give full permission to your var and pub/static folder.
Once permission applied to a directory, run below commands:
php bin/magento setup:upgrade php bin/magento setup:static-content:deploy php bin/magento cache:flush
At last, remove your browser cache and check again.
Hope this helps!
This code solved my issue.
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product_id = $this->getRequest()->getParam('id');
$productData = $objectManager->get('Magento\Catalog\Model\Product')->load($product_id); $rfqonlyProduct = $productData['rfq_only']; ?>
This line of code was throwing error before.
$product_id = $currentProduct->getId();