我们有一个网站车辆搜索页面,一个星期前,我们迁移到了新的托管服务提供商。
所有正在注册的老用户以及某些特定用户在我们的搜索中看不到任何结果,但是当在产品集合中使用dd时,它会显示正确的计数,但是结果列表不属于该集合。
如果使用隐身模式或刷新dns,chrome缓存和本地缓存,我们可以正确看到结果。
如果需要,我可以提供有问题的代码段,但是想知道以前是否有人遇到过此问题。
谢谢
我们已经完成了以下工作;
以下3种方法工作不理想,因为我们不能在客户的机器上使用它;
这是检索和组成集合的代码的一部分;
$products = $this->product->search($data, $page->id, 24, $type, $userlatLon);
此功能如下;
public function search($data, $pageId, $productsPerPage, $type, $userlatLon)
{
if($pageId == 1536){
unset($data['images']);
}
$sortArray = self::sortArray();
$avaiableFilters = self::avaliableFiltersArray();
$types = self::determineTypeFromGivenInt($type);
$select = 'products.url, products.id, products.registration_date, products.created_at as in_stock_date, products.location_code, products.type, products.special_order, products.price, products.sale_price, products.make, products.model,
products.derivative, products.mileage, products.live_until, products.model_year, products.year, products.times_viewed_in_the_last_week, products.transmission, products.tax_cost, products.fuel_type, our_title, our_description, i.our_src_440, f.term, f.first_payment, f.id as finance_id,
no_of_regular_payments, monthy_payments, final_payment, cash_price, cash_deposit, engine_size_formatted, total_deposit, amount_of_credit, total_charge_for_credit, total_amount_payable, products.plus_vat, products.attention_grabber,
apr, l.friendly_name as location_name, l.url as location_url, l.gmaps_url as gmaps, l.address_1, l.town, l.city, l.postcode, l.telephone, if(sale_price > 0 AND sale_price < (price - 100) , 1 , 0) as reduced';
!!!MORE QUERYING IS HERE!!!
if ($type == 4) {
$products = $products->has('pdfRecord')->groupBy('products.make', 'products.model')->paginate($productsPerPage, ['products.url']);
} else {
$products = $products->groupBy('products.id')->paginate($productsPerPage, ['products.url']);
}
return $products;
}
预期结果应该是所有产品都能像普通用户一样显示。
但是该集合返回了648个结果,但其中没有一个结果属于该集合