example-forum 1.11.2 issue with database of VulcanJS version 1.8.10 ?
Open
adalidda
opened this issue 7 years ago
•
4 comments
Hi,
I am testing example-forum Latest commit 41c064d and everything is working fine.
However, when I used this example-forum with my own database (that worked fine with VulcanJS version 1.8.10), I have the problem to edit post or add new post.
When I click on edit, I got the edit screen for a few second then the system is redirect automatically to localhost:3000 (no error message on the log screen). The same error with New Post.
My questions are:
Are there any change between database using in version 1.8.10 and database using in version 1.11.2
If no, how can I change the timer to allow longer time for editing before the system redirect to localhost:3000 ?
Sorry, the error message are TypeError: categories is undefined.
The above error occurred in the <SmartForm> component:
in SmartForm (created by withLoader(Form))
in withLoader(Form) (created by withDeletePost(withLoader(Form)))
in withDeletePost(withLoader(Form)) (created by withUpdatePost(withDeletePost(withLoader(Form))))
in withUpdatePost(withDeletePost(withLoader(Form))) (created by withPost(withUpdatePost(withDeletePost(withLoader(Form)))))
in withPost(withUpdatePost(withDeletePost(withLoader(Form))))
in FormWrapper (created by withRouter(FormWrapper))
in withRouter(FormWrapper) (created by withApollo(withRouter(FormWrapper)))
in withApollo(withRouter(FormWrapper)) (created by withCurrentUser(withApollo(withRouter(FormWrapper))))
in withCurrentUser(withApollo(withRouter(FormWrapper))) (created by PostsEditForm)
in div (created by PostsEditForm)
in PostsEditForm (created by withCurrentUser(PostsEditForm))
in withCurrentUser(PostsEditForm) (created by withRouter(withCurrentUser(PostsEditForm)))
in withRouter(withCurrentUser(PostsEditForm)) (created by Connect(withRouter(withCurrentUser(PostsEditForm))))
in Connect(withRouter(withCurrentUser(PostsEditForm))) (created by PostsItem)
in div (created by ModalBody)
in ModalBody (created by BootstrapModal)
in div (created by ModalDialog)
in div (created by ModalDialog)
in div (created by ModalDialog)
in ModalDialog (created by Modal)
in Transition (created by Fade)
in Fade (created by DialogTransition)
in DialogTransition (created by Modal)
in RefHolder (created by Modal)
in div (created by Modal)
in Portal (created by Modal)
in Modal (created by Modal)
in Modal (created by BootstrapModal)
in BootstrapModal (created by ModalTrigger)
in div (created by ModalTrigger)
in ModalTrigger (created by PostsItem)
in div (created by PostsItem)
in div (created by PostsItem)
in div (created by PostsItem)
in div (created by PostsItem)
in PostsItem (created by PostsList)
in div (created by PostsList)
in div (created by PostsList)
in PostsList (created by withPosts(PostsList))
in withPosts(PostsList) (created by withState(withPosts(PostsList)))
in withState(withPosts(PostsList)) (created by withApollo(withState(withPosts(PostsList))))
in withApollo(withState(withPosts(PostsList))) (created by withCurrentUser(withApollo(withState(withPosts(PostsList)))))
in withCurrentUser(withApollo(withState(withPosts(PostsList)))) (created by PostsHome)
in PostsHome (created by RouterContext)
in div (created by Layout)
in div (created by Layout)
in Layout (created by withCurrentUser(Layout))
in withCurrentUser(Layout) (created by App)
in div (created by App)
in IntlProvider (created by App)
in App (created by withCookies(App))
in withCookies(App) (created by withApollo(withCookies(App)))
in withApollo(withCookies(App)) (created by withUpdateUser(withApollo(withCookies(App))))
in withUpdateUser(withApollo(withCookies(App))) (created by withCurrentUser(withUpdateUser(withApollo(withCookies(App)))))
in withCurrentUser(withUpdateUser(withApollo(withCookies(App)))) (created by RouterContext)
in RouterContext (created by Router)
in ScrollBehaviorContext (created by Router)
in Router
in CookiesProvider
in QueryRecyclerProvider (created by ApolloProvider)
in ApolloProvider
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries. modules.js:108909:5
[Show/hide message details.] TypeError: categories is undefined
Additional information, I just create a blank new database and feed this database from the default seed data, I got the same issue when trying to create new post or edit post. So the issue is not related to the database but with the code itself.
I checked the example-forum code (related to modules/categories) between version 1.8.10 and version 1.11.2 and didn't find anything different so I can't understand the error message TypeError: categories is undefined
TypeError: Cannot read property 'map' of undefined
Below are the error message when using Google chrome;
Uncaught (in promise) Error: Network error: Store reset while query was in flight.
at new ApolloError (modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:71891)
at modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:72960
at meteor.js?hash=1f49b977b0beabbfeaa0ef0bdb87e0693971b18c:1223
ApolloError @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:71891
(anonymous) @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:72960
(anonymous) @ meteor.js?hash=1f49b977b0beabbfeaa0ef0bdb87e0693971b18c:1223
Promise.then (async)
Promise.then @ promise.js?hash=badbb15e6daa4c8fb4dcd6049286a198af5008b4:130
QueryManager.resetStore @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:73239
ApolloClient.resetStore @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:73753
(anonymous) @ LoginFormInner.jsx:36
loginResultCallback @ LoginFormInner.jsx:674
loginResultCallback @ helpers.js:55
Meteor.loginWithPassword @ LoginFormInner.jsx:674
userCallback @ password_client.js:69
(anonymous) @ accounts_client.js:259
(anonymous) @ underscore.js?hash=884c0f04552531e604be5ca6d94381bbf1550f5c:794
loggedInAndDataReadyCallback @ accounts_client.js:380
(anonymous) @ meteor.js?hash=1f49b977b0beabbfeaa0ef0bdb87e0693971b18c:1223
_maybeInvokeCallback @ MethodInvoker.js:52
receiveResult @ MethodInvoker.js:71
_livedata_result @ livedata_connection.js:1508
onMessage @ livedata_connection.js:1667
forEachCallback.callback @ browser.js:186
forEachCallback @ common.js:30
socket.onmessage.data @ browser.js:185
REventTarget.dispatchEvent @ sockjs-0.3.4.js:87
SockJS._dispatchMessage @ sockjs-0.3.4.js:1072
SockJS._didMessage @ sockjs-0.3.4.js:1130
that.ws.onmessage @ sockjs-0.3.4.js:1277
schema.js:11 Uncaught TypeError: Cannot read property 'map' of undefined
at getCategoriesAsOptions (schema.js:11)
at Object.options (custom_fields.js:21)
at SmartForm.createField (Form.jsx:371)
at fields.getFieldNames.map.fieldName (Form.jsx:234)
at Array.map ()
at SmartForm.getFieldGroups (Form.jsx:232)
at SmartForm.render (Form.jsx:816)
at finishClassComponent (modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:107168)
at updateClassComponent (modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:107145)
at beginWork (modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:107520)
getCategoriesAsOptions @ schema.js:11
options @ custom_fields.js:21
SmartForm.createField @ Form.jsx:371
fields.getFieldNames.map.fieldName @ Form.jsx:234
SmartForm.getFieldGroups @ Form.jsx:232
render @ Form.jsx:816
finishClassComponent @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:107168
updateClassComponent @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:107145
beginWork @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:107520
performUnitOfWork @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:109519
workLoop @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:109583
callCallback @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:99837
invokeGuardedCallbackDev @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:99876
invokeGuardedCallback @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:99733
renderRoot @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:109661
performWorkOnRoot @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:110309
performWork @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:110262
requestWork @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:110173
scheduleWorkImpl @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:110027
scheduleWork @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:109984
enqueueForceUpdate @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:105545
Component.forceUpdate @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:17762
GraphQL.forceRenderChildren @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:69719
next @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:69694
handleError @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:69698
(anonymous) @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:72257
error @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:72255
(anonymous) @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:73008
(anonymous) @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:73493
(anonymous) @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:73490
QueryManager.broadcastQueries @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:73487
(anonymous) @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:73422
(anonymous) @ meteor.js?hash=1f49b977b0beabbfeaa0ef0bdb87e0693971b18c:1223
Promise.then (async)
Promise.then @ promise.js?hash=badbb15e6daa4c8fb4dcd6049286a198af5008b4:130
(anonymous) @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:73403
QueryManager.fetchRequest @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:73399
QueryManager.fetchQuery @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:72935
QueryManager.startQuery @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:73243
ObservableQuery.setUpQuery @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:72266
ObservableQuery.onSubscribe @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:72217
subscriberFunction @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:71971
Observable.subscribe @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:71845
GraphQL.subscribeToQuery @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:69701
GraphQL.componentDidMount @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:69478
commitLifeCycles @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:108065
commitAllLifeCycles @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:109241
callCallback @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:99837
invokeGuardedCallbackDev @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:99876
invokeGuardedCallback @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:99733
commitRoot @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:109345
performWorkOnRoot @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:110312
performWork @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:110262
batchedUpdates @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:110381
batchedUpdates @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:101625
dispatchEvent @ modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:102716
modules.js?hash=1f63cd5c7c83f2972188109be047cda2b9fbc226:109042 The above error occurred in the <SmartForm> component:
in SmartForm (created by withLoader(Form))
in withLoader(Form) (created by withDeletePost(withLoader(Form)))
in withDeletePost(withLoader(Form)) (created by withUpdatePost(withDeletePost(withLoader(Form))))
in withUpdatePost(withDeletePost(withLoader(Form))) (created by withPost(withUpdatePost(withDeletePost(withLoader(Form)))))
in withPost(withUpdatePost(withDeletePost(withLoader(Form))))
in FormWrapper (created by withRouter(FormWrapper))
in withRouter(FormWrapper) (created by withApollo(withRouter(FormWrapper)))
in withApollo(withRouter(FormWrapper)) (created by withCurrentUser(withApollo(withRouter(FormWrapper))))
in withCurrentUser(withApollo(withRouter(FormWrapper))) (created by PostsEditForm)
in div (created by PostsEditForm)
in PostsEditForm (created by withCurrentUser(PostsEditForm))
in withCurrentUser(PostsEditForm) (created by withRouter(withCurrentUser(PostsEditForm)))
in withRouter(withCurrentUser(PostsEditForm)) (created by Connect(withRouter(withCurrentUser(PostsEditForm))))
in Connect(withRouter(withCurrentUser(PostsEditForm))) (created by PostsItem)
in div (created by ModalBody)
in ModalBody (created by BootstrapModal)
in div (created by ModalDialog)
in div (created by ModalDialog)
in div (created by ModalDialog)
in ModalDialog (created by Modal)
in Transition (created by Fade)
in Fade (created by DialogTransition)
in DialogTransition (created by Modal)
in RefHolder (created by Modal)
in div (created by Modal)
in Portal (created by Modal)
in Modal (created by Modal)
in Modal (created by BootstrapModal)
in BootstrapModal (created by ModalTrigger)
in div (created by ModalTrigger)
in ModalTrigger (created by PostsItem)
in div (created by PostsItem)
in div (created by PostsItem)
in div (created by PostsItem)
in div (created by PostsItem)
in PostsItem (created by PostsList)
in div (created by PostsList)
in div (created by PostsList)
in PostsList (created by withPosts(PostsList))
in withPosts(PostsList) (created by withState(withPosts(PostsList)))
in withState(withPosts(PostsList)) (created by withApollo(withState(withPosts(PostsList))))
in withApollo(withState(withPosts(PostsList))) (created by withCurrentUser(withApollo(withState(withPosts(PostsList)))))
in withCurrentUser(withApollo(withState(withPosts(PostsList)))) (created by PostsHome)
in PostsHome (created by RouterContext)
in div (created by Layout)
in div (created by Layout)
in Layout (created by withCurrentUser(Layout))
in withCurrentUser(Layout) (created by App)
in div (created by App)
in IntlProvider (created by App)
in App (created by withCookies(App))
in withCookies(App) (created by withApollo(withCookies(App)))
in withApollo(withCookies(App)) (created by withUpdateUser(withApollo(withCookies(App))))
in withUpdateUser(withApollo(withCookies(App))) (created by withCurrentUser(withUpdateUser(withApollo(withCookies(App)))))
in withCurrentUser(withUpdateUser(withApollo(withCookies(App)))) (created by RouterContext)
in RouterContext (created by Router)
in ScrollBehaviorContext (created by Router)
in Router
in CookiesProvider
in QueryRecyclerProvider (created by ApolloProvider)
in ApolloProvider