Open hatchli opened 2 months ago
@hatchli @paulpopus Is there any update on this? I am currently trying to enable the search plugin on version 3.0.0-beta.24
and am seeing both these errors in addition to an empty search results index in the admin dash.
Something (I believe depth) has changed with the search plugin from its 2.0 version to the latest 3.0 beta.
To reproduce, simply create a new Restaurant in the Restaurants collection - theoretically, the search plugin is supposed to create a zero-depth search-optimized collection representing that restaurant. While the plugin succeeds in creating an object, the searchOverrides appear to fail: the city and citySlug fields fail while also returning the above Webpack error (which shouldn't exist in 3.0). Additionally, trying to open any of the Search Results collection causes a crash.
The error below logs out constantly when navigating around the Admin Panel, but doesn't to seem cause any problems, so I've generally ignored it:
This is how I configure the search plugin in the payload config, which worked just fine in 2.0:
This is how it appears in the admin panel, where you can see the 2.0 entries that succeeded with the same config, and the failed 3.0beta21 entry
Doing an additional payload call on the assumption that the depth of the query changed fixes the searchOverrides issue:
Notably the webpack error persists despite the above fix, and clicking any search item causes the admin panel to crash with the console logging that same aforementioned webpack error followed by this TypeError:
I've sent @paulpopus the repro and dm'd him the env file for reproduction.