-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack Error with @payloadcms/plugin-search (Beta 21) #6456
Comments
@hatchli @paulpopus Is there any update on this? I am currently trying to enable the search plugin on version |
This should no longer be an issue on the latest beta from my testing just now. If it persists let me know though! |
Thanks Paul! Sadly I can't test this as a necessary package my in my project can't go React 15 yet. But, for future projects I'll be sure to report here if this issue stands! Thanks for following up and taking care of this! |
This issue has been automatically locked. |
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.
The text was updated successfully, but these errors were encountered: