Shopware 6.7 Migrations crahed die Suche

Moin, ich habe gerade ein paar Daten, testweise, migrtiert.

Danach wollte ich die Suche benutzte, aber sobald ein paar Such-Vorschläge kommen sollen, wird mit meine Seite in der Suche angezeigt (Mobile Version).
Das passiert erst wenn ich das erste mal die Produkte migriert haben.

Kennt das jemand?

Moin @derhelle ,

dann handelt es sich bestimmt um eine Fehlerseite, die einfach komplett als Antwort geladen wird vermute ich mal. Ich gehe davon aus, dass eventuell irgendwo eine Fehlkonfiguration vorgenommen wurde? Hast du eine Fehlermeldung?

Dürfte aber nicht nur die mobile Ansicht betreffen.

Grüße
Matthias

1 „Gefällt mir“

Es wird eine 404 Seite geladen.

Ja das stimmt, Fehler kommt immer.

Chrome - Dev - Network sagt 500

Logfiles sind leer.

Seite lief, bis zur Migration.

Gruß Helle

Diesen Fehler hier konnte ich auch noch finden:

storefront.search-wi….plugin.cba7f9.js:1
GET xxxxxxxx.de 404 (Not Found)
_suggest @ storefront.search-wi….plugin.cba7f9.js:1
_handleInputEvent @ storefront.search-wi….plugin.cba7f9.js:1
setTimeout
(anonymous) @ storefront.js?1774303223:1

Moin @derhelle ,

hast du den Debug Modus mal angestellt? Wenn das Network einen 500er zurück gibt dann sollte in der Regel irgendwo etwas geloggt werden.

Hast du irgendwelche Plugins, welche auf die Suche zugreifen?

Grüße
Matthias

1 „Gefällt mir“

Moin, Debug Modus in Shopware?

Alle Plugins sind deaktiviert.

Gruß Helle

Moin,

in der .env.local den Wert APP_DEBUG=1
Dann könntest du Glück haben, dass im Frontend eine Fehlermeldung angezeigt wird.

Grüße
Matthias

1 „Gefällt mir“

Fehler ist gekommen, nur kann ich leider nichts damit anfangen :slight_smile:

ProductException
HTTP 404 Not Found
Could not find sorting with key „“
Exception

Shopware\Core\Content\Product
ProductException
Show exception properties
in vendor/shopware/core/Content/Product/ProductException.php (line 43)
); } public static function sortingNotFoundException(string $key): self { return new self( Response::HTTP_NOT_FOUND, self::SORTING_NOT_FOUND, self::$couldNotFindMessage, [‚entity‘ => ‚sorting‘, ‚field‘ => ‚key‘, ‚value‘ => $key] );
in vendor/shopware/core/Content/Product/SalesChannel/Listing/Processor/SortingListingProcessor.php :: sortingNotFoundException (line 92)
private function getCurrentSorting(ProductSortingCollection $sortings, Request $request, string $salesChannelId): ?ProductSortingEntity { $key = RequestParamHelper::get($request, ‚order‘); if (!\is_string($key)) { throw ProductException::sortingNotFoundException(‚‘); } $sorting = $sortings->getByKey($key); if ($sorting !== null) { return $sorting;
in vendor/shopware/core/Content/Product/SalesChannel/Listing/Processor/SortingListingProcessor.php → getCurrentSorting (line 53)
/** @var ProductSortingCollection $sortings / $sortings = $criteria->getExtension(‚sortings‘) ?? new ProductSortingCollection(); $sortings->merge($this->getAvailableSortings($request, $context->getContext())); $currentSorting = $this->getCurrentSorting($sortings, $request, $context->getSalesChannelId()); if ($currentSorting !== null) { $fallbackSorting = null; if ($this->hasQueriesOrTerm($criteria)) { $fallbackSorting = new FieldSorting(‚_score‘, FieldSorting::DESCENDING);
in vendor/shopware/core/Content/Product/SalesChannel/Listing/Processor/CompositeListingProcessor.php → prepare (line 32)
} public function prepare(Request $request, Criteria $criteria, SalesChannelContext $context): void { foreach ($this->processors as $processor) { $processor->prepare($request, $criteria, $context); } } public function process(Request $request, ProductListingResult $result, SalesChannelContext $context): void {
in vendor/shopware/core/Content/Product/SalesChannel/Suggest/ResolvedCriteriaProductSuggestRoute.php → prepare (line 54)
new ProductAvailableFilter($context->getSalesChannelId(), ProductVisibilityDefinition::VISIBILITY_SEARCH) ); $this->searchBuilder->build($request, $criteria, $context); $this->processor->prepare($request, $criteria, $context); $this->eventDispatcher->dispatch( new ProductSuggestCriteriaEvent($request, $criteria, $context), ProductEvents::PRODUCT_SUGGEST_CRITERIA );
in vendor/shopware/storefront/Page/Suggest/SuggestPageLoader.php → load (line 48)
$criteria = new Criteria(); $criteria->setLimit(10); $criteria->setTotalCountMode(Criteria::TOTAL_COUNT_MODE_EXACT); $page->setSearchResult( $this->productSuggestRoute ->load($request, $salesChannelContext, $criteria) ->getListingResult() ); $page->setSearchTerm((string) $request->query->get(‚search‘));
in vendor/shopware/storefront/Controller/SearchController.php → load (line 83)
{ if (!$request->request->has(‚no-aggregations‘)) { $request->request->set(‚no-aggregations‘, true); } $page = $this->suggestPageLoader->load($request, $context); $this->hook(new SuggestPageLoadedHook($page, $context)); return $this->renderStorefront(‚
@Storefront*/storefront/layout/header/search-suggest.html.twig‘, [‚page‘ => $page]); }
in vendor/symfony/http-kernel/HttpKernel.php → suggest (line 183)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS); $controller = $event->getController(); $arguments = $event->getArguments(); // call controller $response = $controller(…$arguments); // view if (!$response instanceof Response) { $event = new ViewEvent($this, $request, $type, $response, $event); $this->dispatcher->dispatch($event, KernelEvents::VIEW);
in vendor/symfony/http-kernel/HttpKernel.php → handleRaw (line 76)
$request->headers->set(‚X-Php-Ob-Level‘, (string) ob_get_level()); $this->requestStack->push($request); $response = null; try { return $response = $this->handleRaw($request, $type); } catch (\Throwable $e) { if ($e instanceof \Error && !$this->handleAllThrowables) { throw $e; }
in vendor/shopware/core/Framework/Adapter/Kernel/HttpKernel.php → handle (line 72)
$this->dispatcher->dispatch($event); return $event->getResponse(); } return parent::handle($request, $type, $catch); }}
in vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php → handle (line 86)
if (!IpUtils::checkIp(‚127.0.0.1‘, $trustedProxies)) { Request::setTrustedProxies(array_merge($trustedProxies, [‚127.0.0.1‘]), Request::getTrustedHeaderSet()); } try { return $kernel->handle($request, $type, $catch); } finally { // restore global state Request::setTrustedProxies($trustedProxies, $trustedHeaderSet); } }
in vendor/symfony/http-kernel/HttpCache/HttpCache.php :: handle (line 466)
protected function forward(Request $request, bool $catch = false, ?Response $entry = null): Response { $this->surrogate?->addSurrogateCapability($request); // always a „master“ request (as the real master request can be in cache) $response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MAIN_REQUEST, $catch); /* * Support stale-if-error given on Responses or as a config option. * RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual * Cache-Control directives) that
in vendor/symfony/http-kernel/HttpCache/HttpCache.php → forward (line 443)
// avoid that the backend sends no content $subRequest->headers->remove(‚If-Modified-Since‘); $subRequest->headers->remove(‚If-None-Match‘); $response = $this->forward($subRequest, $catch); if ($response->isCacheable()) { $this->store($request, $response); }
in vendor/symfony/http-kernel/HttpCache/HttpCache.php → fetch (line 341)
} if (null === $entry) { $this->record($request, ‚miss‘); return $this->fetch($request, $catch); } if (!$this->isFreshEnough($request, $entry)) { $this->record($request, ‚stale‘);
in vendor/symfony/http-kernel/HttpCache/HttpCache.php → lookup (line 216)
$response = $this->fetch($request, $catch); } else { $response = null; do { try { $response = $this->lookup($request, $catch); } catch (CacheWasLockedException) { } } while (null === $response); }
in vendor/shopware/core/Framework/Adapter/Kernel/HttpCacheKernel.php → handle (line 61)
// only handle main request inside http cache, because ESI tags are also interpreted as main request. // sub requests are requests, which are forwarded to the kernel inside the php stack // [HttpKernel] HttpCache does not pass real request type to the kernel when no cache found · Issue #51648 · symfony/symfony · GitHub if ($type === HttpKernelInterface::MAIN_REQUEST) { $response = parent::handle($request, $type, $catch); } elseif ($request->attributes->has(‚_sw_esi‘)) { $response = parent::handle($request, $type, $catch); } else { $response = $this->getKernel()->handle($request, $type, $catch); }
in vendor/shopware/core/Kernel.php → handle (line 129)
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response { $this->boot(); return $this->getHttpKernel()->handle($request, $type, $catch); } public function boot(): void { if (!$this->booted) {
in vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php → handle (line 35)
) { } public function run(): int { $response = $this->kernel->handle($this->request); if (Kernel::VERSION_ID >= 60400) { $response->send(false); if (\function_exists(‚fastcgi_finish_request‘) && !$this->debug) {
in vendor/autoload_runtime.php → run (line 32)
$app = $app(…$args);exit( $runtime ->getRunner($app) ->run());
require_once(‚/data/shopware/vendor/autoload_runtime.php‘)
in public/index.php (line 10)
use Shopware\Core\Installer\InstallerKernel;use Shopware\Core\Framework\Adapter\Kernel\KernelFactory;$_SERVER[‚SCRIPT_FILENAME‘] = FILE;require_once DIR . ‚/../vendor/autoload_runtime.php‘;if (!file_exists(DIR . ‚/../.env‘) && !file_exists(DIR . ‚/../.env.dist‘) && !file_exists(DIR . ‚/../.env.local.php‘)) { $_SERVER[‚APP_RUNTIME_OPTIONS‘][‚disable_dotenv‘] = true;}

In der Suche wird wohl eine Sortierung eingestellt sein, die nicht existiert. Einfach in den Einstellungen eine andere Sortierung auswählen, dann wird es vermutlich wieder tun.

Habe ich versucht, bringt aber leider nichts.

Also bei der Fehlermeldung wird eindeutig die Sortierung bemängelt. Sicher das dort alles Standard ist? Irgendetwas vor der Migration hier verändert? Ich schließe die Migration selber als Fehlerquelle aus.

1 „Gefällt mir“

Ich habe an der Suche nichts geändert. Alles was ich gemacht habe war ein eigenes Theme zu erstellen und dort CSS anzupassen. Aber selbst wenn ich das Theme deaktiviere, bleibt der Fehler.
Ich habe die Einstellungen der Suche mit dem anderen Shop Verglichen, scheint alles zu passen.

Oder Übersehe ich Einstellungen in der Suche? Ich schaue unter “Einstellungen –> Suche”

Überprüfe auch mal die Sortirung Einstellungen => Produkt => Sortier Optionen

Im Standard sieht das so aus:


Die Migration verändert weder die Suche noch die Sortierung.

2 „Gefällt mir“

DAS WARS!!! Danke für eure Hilfe…..

Unter Standard-Sortierung der Suchergebnisse war nichts ausgewählt…..ist aber erst nach der Migration so.

1 „Gefällt mir“