codepic opened a new issue #11113:
URL: https://github.com/apache/incubator-superset/issues/11113


   Emitting filter from a plugin leads to a `TypeError: Cannot read property 
'columns' of undefined` exception 
`incubator-superset/superset-frontend/src/dashboard/reducers/dashboardFilters.js`
 line `110`.
   
   The same issue seems to happen with incubator-superset `0.37.2` table plugin 
when you enable the emit filter functionality.
   
   ### Expected results
   
   No exception and filter being emitted.
   
   ### Actual results
   
   Exception: `TypeError: Cannot read property 'columns' of undefined` 
exception 
`incubator-superset/superset-frontend/src/dashboard/reducers/dashboardFilters.js`
 line `110`
   
   #### Screenshots
   
   
![image](https://user-images.githubusercontent.com/3933589/94662142-48be8800-0308-11eb-9dff-e1e7a27a827c.png)
   
   
![image](https://user-images.githubusercontent.com/3933589/94662598-eade7000-0308-11eb-8078-dab2ea9fbd32.png)
   
   #### How to reproduce the bug
   
   1. Pull incubator-superset 39cce712afdc00af73daa2243cbae08a14b7dc0e
   2. Go to `data > datasets`
   3. Select `birth_names`
   4. Select `customize > emit filter evens`
   5. Select `Data > GROUP BY` and add fields `gender` and `name`
   6. Run query
   7. Save as `tblNames` and add to new dashboard `dbNames`
   8. Go to dashboard
   9. Open browser console
   10. Click any of the cells in the table
   11. Observe the following error
   
   ```javascript
   Uncaught TypeError: Cannot read property 'columns' of undefined
       at Object.CHANGE_FILTER (dashboardFilters.js?12c8:105)
       at dashboardFiltersReducer (dashboardFilters.js?12c8:169)
       at combination (combineReducers.js?89a8:120)
       at dispatch (createStore.js?61ed:165)
       at eval (loggerMiddleware.js?7f0c:68)
       at eval (index.js?b083:11)
       at dispatch (applyMiddleware.js?05f2:35)
       at eval (dashboardFilters.js?1bd4:50)
       at eval (index.js?b083:8)
       at Object.eval [as changeFilter] (bindActionCreators.js?f901:3)
   CHANGE_FILTER @ dashboardFilters.js?12c8:105
   dashboardFiltersReducer @ dashboardFilters.js?12c8:169
   combination @ combineReducers.js?89a8:120
   dispatch @ createStore.js?61ed:165
   eval @ loggerMiddleware.js?7f0c:68
   eval @ index.js?b083:11
   dispatch @ applyMiddleware.js?05f2:35
   eval @ dashboardFilters.js?1bd4:50
   eval @ index.js?b083:8
   eval @ bindActionCreators.js?f901:3
   changeFilter @ Chart.jsx?484f:192
   changeFilter @ react-hot-loader.development.js?c2cb:714
   handleAddFilter @ ChartRenderer.jsx?b661:103
   handleAddFilter @ react-hot-loader.development.js?c2cb:714
   toggleFilter @ TableChart.js?8bc0:178
   Cell.cellProps.onClick @ TableChart.js?8bc0:222
   callCallback @ react-dom.development.js?7f13:189
   invokeGuardedCallbackDev @ react-dom.development.js?7f13:238
   invokeGuardedCallback @ react-dom.development.js?7f13:293
   invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js?7f13:307
   executeDispatch @ react-dom.development.js?7f13:390
   executeDispatchesInOrder @ react-dom.development.js?7f13:412
   executeDispatchesAndRelease @ react-dom.development.js?7f13:3279
   executeDispatchesAndReleaseTopLevel @ react-dom.development.js?7f13:3288
   forEachAccumulated @ react-dom.development.js?7f13:3260
   runEventsInBatch @ react-dom.development.js?7f13:3305
   runExtractedPluginEventsInBatch @ react-dom.development.js?7f13:3515
   handleTopLevel @ react-dom.development.js?7f13:3559
   batchedEventUpdates$1 @ react-dom.development.js?7f13:21903
   batchedEventUpdates @ react-dom.development.js?7f13:1061
   dispatchEventForLegacyPluginEventSystem @ react-dom.development.js?7f13:3569
   attemptToDispatchEvent @ react-dom.development.js?7f13:4268
   dispatchEvent @ react-dom.development.js?7f13:4190
   unstable_runWithPriority @ scheduler.development.js?b589:653
   runWithPriority$1 @ react-dom.development.js?7f13:11062
   discreteUpdates$1 @ react-dom.development.js?7f13:21919
   discreteUpdates @ react-dom.development.js?7f13:1072
   dispatchDiscreteEvent @ react-dom.development.js?7f13:4169
   Show 8 more frames
   ```
   
   ### Environment
   
   - superset version: 39cce712afdc00af73daa2243cbae08a14b7dc0e
   - also replicable with superset version: `0.37.2`
   - python version: `Python 2.7.17`
   - node.js version: `v12.18.4`
   - npm version: `6.14.6`
   
   ### Checklist
   
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [ ] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version 
of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   I may be able to fix this myself if you just give me proper context so that 
I know where to look.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to