sanity-io / dashboard-widget-document-list

Dashboard widget for the Sanity Content Studio which displays a list of documents
MIT License
17 stars 8 forks source link

Red Monitor dude, aka Bob #7

Closed pierrenel closed 4 years ago

pierrenel commented 4 years ago

When I click any of the links - apparently it's got something to do with draft id in the url?

pierrenel commented 4 years ago

Stack trace:
TypeError: Cannot read property 'patch' of null
    at http://localhost:3333/static/js/app.bundle.js:198013:37
    at renderWithHooks (/static/js/vendor.bundle.js:19181:18)
    at mountIndeterminateComponent (/static/js/vendor.bundle.js:21715:13)
    at beginWork$1 (/static/js/vendor.bundle.js:23083:16)
    at HTMLUnknownElement.callCallback (/static/js/vendor.bundle.js:3259:14)
    at Object.invokeGuardedCallbackDev (/static/js/vendor.bundle.js:3308:16)
    at invokeGuardedCallback (/static/js/vendor.bundle.js:3363:31)
    at beginWork$$1 (/static/js/vendor.bundle.js:28701:7)
    at performUnitOfWork (/static/js/vendor.bundle.js:27616:12)
    at workLoopSync (/static/js/vendor.bundle.js:27592:22)
Component stack:
    in Unknown
    in StreamingComponent
    in StreamingComponent (created by Context.Consumer)
    in WithInitialValueWrapper (created by Pane)
    in Pane (created by DeskToolPanes)
    in SplitPaneWrapper (created by DeskToolPanes)
    in div (created by Pane)
    in Pane (created by SplitPane)
    in div (created by SplitPane)
    in SplitPane (created by PanesSplitController)
    in div (created by PanesSplitController)
    in div (created by Pane)
    in Pane (created by SplitPane)
    in div (created by SplitPane)
    in SplitPane (created by PanesSplitController)
    in div (created by PanesSplitController)
    in PanesSplitController (created by DeskToolPanes)
    in div (created by DeskToolPanes)
    in DeskToolPanes (created by DeskTool)
    in div (created by DeskTool)
    in DeskTool (created by withRouter(DeskTool))
    in withRouter(DeskTool) (created by DeskToolPaneStateSyncer)
    in DeskToolPaneStateSyncer (created by RenderTool)
    in RenderTool (created by SchemaErrorReporter)
    in RouteScope (created by SchemaErrorReporter)
    in div (created by SchemaErrorReporter)
    in div (created by SchemaErrorReporter)
    in div (created by SchemaErrorReporter)
    in SchemaErrorReporter (created by DefaultLayout)
    in DefaultLayout (created by withRouter(DefaultLayout))
    in withRouter(DefaultLayout) (created by DefaultLayoutContainer)
    in RouterProvider (created by DefaultLayoutContainer)
    in LoginWrapper (created by DefaultLayoutContainer)
    in DefaultLayoutContainer (created by SanityRoot)
    in SnackbarProvider (created by SanityRoot)
    in div (created by SanityRoot)
    in SanityRoot
    in AppContainer```
skogsmaskin commented 4 years ago

Seems like https://github.com/sanity-io/dashboard-widget-document-list/blob/master/src/sanityConnector.js#L16 is filtering on draft. and not drafts.

skogsmaskin commented 4 years ago

For context, @pierrenel is getting links like this in the list which leads to the error:

http://localhost:3333/intent/edit/type=landingpage;id=drafts.3832527e-759c-4e01-a0aa-feb070e3c438/

skogsmaskin commented 4 years ago

This is actually a bug in the studio! Tracking it elsewhere.

skogsmaskin commented 4 years ago

Partially fixed by https://github.com/sanity-io/dashboard-widget-document-list/pull/8/files - but the studio issue remains.