System Information
- Strapi Version: 3.6.1
- Operating System: macOS Big Sur
- Database: mongo
- Node Version: 16.13.0
- NPM Version: 8.1.0
- Yarn Version: 1.22.15
When adding a preview button to the right-hand side menu of the edit view, I sometimes get the below error when opening the edit view of a collection type. It’s quite inconsistent.
I have followed the steps in this tutorial How to Create a Preview Button in Strapi v3 for Next.js
createActionAllowedFields and updateActionAllowedFields from useContentManagerEditViewDataManager are both [undefined] in webpack:///./.cache/plugins/strapi-plugin-content-manager/admin/src/components/FieldComponent/utils/select.js
select.js:52 Uncaught TypeError: Cannot read properties of undefined (reading ‘split’)
at select.js:52
at Array.map ()
at select.js:50
at mountMemo (react-dom.development.js:15442)
at Object.useMemo (react-dom.development.js:15738)
at useMemo (react.development.js:1521)
at useSelect (select.js:39)
at connect.js:6
at renderWithHooks (react-dom.development.js:14803)
at mountIndeterminateComponent (react-dom.development.js:17482)
The above error occurred in one of your React components:
in Unknown (created by CollectionTypeFormWrapper)
in div (created by CollectionTypeFormWrapper)
in div (created by styled.div)
in styled.div (created by CollectionTypeFormWrapper)
in div (created by CollectionTypeFormWrapper)
in div (created by CollectionTypeFormWrapper)
in div (created by styled.div)
in styled.div (created by CollectionTypeFormWrapper)
in form (created by EditViewDataManagerProvider)
in EditViewDataManagerProvider (created by CollectionTypeFormWrapper)
in CollectionTypeFormWrapper
in CollectionTypeFormWrapper (created by EditView)
in EditView
in EditView (created by Permissions)
in Permissions
in Permissions (created by EditViewLayoutManager)
in EditViewLayoutManager (created by Context.Consumer)
in Route (created by CollectionTypeRecursivePath)
in Switch (created by CollectionTypeRecursivePath)
in ErrorBoundary (created by CollectionTypeRecursivePath)
in CollectionTypeRecursivePath (created by Context.Consumer)
in Route (created by Main)
in Switch (created by Main)
in Unknown (created by Main)
in Main (created by ConnectFunction)
in ConnectFunction (created by PluginDispatcher)
in ErrorBoundary (created by PluginDispatcher)
in div (created by PluginDispatcher)
in PluginDispatcher
in PluginDispatcher (created by Context.Consumer)
in Route (created by Admin)
in Switch (created by Admin)
in div (created by styled.div)
in styled.div (created by Admin)
in div (created by Admin)
in div (created by styled.div)
in styled.div (created by Admin)
in GlobalContextProvider (created by Admin)
in UserProvider (created by PermissionsManager)
in PermissionsManager (created by Admin)
in Admin (created by ConnectFunction)
in ConnectFunction (created by Context.Consumer)
in injectIntl(Connect(Admin)) (created by Context.Consumer)
in Route (created by PrivateRoute)
in PrivateRoute (created by App)
in Switch (created by App)
in div (created by styled.div)
in styled.div (created by App)
in QueryClientProvider (created by App)
in div (created by styled.div)
in styled.div (created by App)
in Unknown (created by Theme)
in Theme (created by App)
in App (created by ConnectFunction)
in ConnectFunction
in Router (created by BrowserRouter)
in BrowserRouter
in IntlProvider (created by LanguageProvider)
in LanguageProvider (created by ConnectFunction)
in ConnectFunction
in StrapiProvider
in Provider
React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.