ProjectMirador / mirador-dl-plugin

a Mirador 3 plugin that adds manifest-provided download links to the window options menu
https://mirador-download-plugin.netlify.com/
Other
6 stars 7 forks source link

Function components cannot be given refs #48

Open ewlarson opened 4 years ago

ewlarson commented 4 years ago

Hello! I'm seeing a new issue with Mirador 3.0.0-beta.6 and mirador-dl-plugin 0.11.0 (the latest releases). When I click on the vertical ellipse icon to toggle the download feature, I'm seeing the error written below.

Mirador configuration/instance is here:

Any help or suggestions would be greatly appreciated!

Screen Shot 2020-03-24 at 10 16 33 AM

Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Check the render method of `ForwardRef(Menu)`.
    in PluginHook (at WindowTopBarPluginMenu.js:82)
    in ul (created by ForwardRef(List))
    in ForwardRef(List) (created by WithStyles(ForwardRef(List)))
    in WithStyles(ForwardRef(List)) (created by ForwardRef(MenuList))
    in ForwardRef(MenuList) (created by ForwardRef(Menu))
    in div (created by ForwardRef(Paper))
    in ForwardRef(Paper) (created by WithStyles(ForwardRef(Paper)))
    in WithStyles(ForwardRef(Paper)) (created by Transition)
    in Transition (created by ForwardRef(Grow))
    in ForwardRef(Grow) (created by TrapFocus)
    in TrapFocus (created by ForwardRef(Modal))
    in div (created by ForwardRef(Modal))
    in ForwardRef(Portal) (created by ForwardRef(Modal))
    in ForwardRef(Modal) (created by ForwardRef(Popover))
    in ForwardRef(Popover) (created by WithStyles(ForwardRef(Popover)))
    in WithStyles(ForwardRef(Popover)) (created by ForwardRef(Menu))
    in ForwardRef(Menu) (created by WithStyles(ForwardRef(Menu)))
    in WithStyles(ForwardRef(Menu)) (at WindowTopBarPluginMenu.js:66)
    in WindowTopBarPluginMenu (at withPlugins.js:20)
    in WithPlugins(WindowTopBarPluginMenu) (created by ConnectFunction)
    in ConnectFunction (created by WithStyles(Connect(WithPlugins(WindowTopBarPluginMenu))))
    in WithStyles(Connect(WithPlugins(WindowTopBarPluginMenu))) (created by withI18nextTranslation(WithStyles(Connect(WithPlugins(WindowTopBarPluginMenu)))))
    in withI18nextTranslation(WithStyles(Connect(WithPlugins(WindowTopBarPluginMenu)))) (at WindowTopBar.js:63)
    in div (created by ForwardRef(Toolbar))
    in ForwardRef(Toolbar) (created by WithStyles(ForwardRef(Toolbar)))
    in WithStyles(ForwardRef(Toolbar)) (at WindowTopBar.js:37)
    in nav (at WindowTopBar.js:36)
    in header (created by ForwardRef(Paper))
    in ForwardRef(Paper) (created by WithStyles(ForwardRef(Paper)))
    in WithStyles(ForwardRef(Paper)) (created by ForwardRef(AppBar))
    in ForwardRef(AppBar) (created by WithStyles(ForwardRef(AppBar)))
    in WithStyles(ForwardRef(AppBar)) (at WindowTopBar.js:35)
    in WindowTopBar (at withPlugins.js:26)
    in WithPlugins(WindowTopBar) (created by ConnectFunction)
    in ConnectFunction (created by WithStyles(Connect(WithPlugins(WindowTopBar))))
    in WithStyles(Connect(WithPlugins(WindowTopBar))) (created by withI18nextTranslation(WithStyles(Connect(WithPlugins(WindowTopBar)))))
    in withI18nextTranslation(WithStyles(Connect(WithPlugins(WindowTopBar)))) (at Window.js:50)
    in div (at Window.js:49)
    in section (created by ForwardRef(Paper))
    in ForwardRef(Paper) (created by WithStyles(ForwardRef(Paper)))
    in WithStyles(ForwardRef(Paper)) (at Window.js:82)
    in Window (at withPlugins.js:49)
    in WithPlugins(Window) (created by ConnectFunction)
    in ConnectFunction (created by WithStyles(Connect(WithPlugins(Window))))
    in WithStyles(Connect(WithPlugins(Window))) (created by withI18nextTranslation(WithStyles(Connect(WithPlugins(Window)))))
    in withI18nextTranslation(WithStyles(Connect(WithPlugins(Window)))) (at WorkspaceMosaic.js:130)
    in div (created by InternalMosaicWindow)
    in div (created by InternalMosaicWindow)
    in InternalMosaicWindow (created by Context.Consumer)
    in DragSource(InternalMosaicWindow) (created by Context.Consumer)
    in DropTarget(DragSource(InternalMosaicWindow)) (created by MosaicWindow)
    in MosaicWindow (at WorkspaceMosaic.js:123)
    in div (created by MosaicRoot)
    in div (created by MosaicRoot)
    in MosaicRoot (created by Mosaic)
    in div (created by Mosaic)
    in Mosaic (created by DragDropContext(Mosaic))
    in DragDropContext(Mosaic) (at WorkspaceMosaic.js:151)
    in WorkspaceMosaic (at withPlugins.js:20)
    in WithPlugins(WorkspaceMosaic) (created by ConnectFunction)
    in ConnectFunction (created by WithStyles(Connect(WithPlugins(WorkspaceMosaic))))
    in WithStyles(Connect(WithPlugins(WorkspaceMosaic))) (at Workspace.js:32)
    in div (at Workspace.js:96)
    in Workspace (at withPlugins.js:26)
    in WithPlugins(Workspace) (created by ConnectFunction)
    in ConnectFunction (created by WithStyles(Connect(WithPlugins(Workspace))))
    in WithStyles(Connect(WithPlugins(Workspace))) (created by withI18nextTranslation(WithStyles(Connect(WithPlugins(Workspace)))))
    in withI18nextTranslation(WithStyles(Connect(WithPlugins(Workspace)))) (at WorkspaceArea.js:37)
    in main (at WorkspaceArea.js:26)
    in WorkspaceArea (at withPlugins.js:26)
    in WithPlugins(WorkspaceArea) (created by ConnectFunction)
    in ConnectFunction (created by WithStyles(Connect(WithPlugins(WorkspaceArea))))
    in WithStyles(Connect(WithPlugins(WorkspaceArea))) (created by withI18nextTranslation(WithStyles(Connect(WithPlugins(WorkspaceArea)))))
    in withI18nextTranslation(WithStyles(Connect(WithPlugins(WorkspaceArea)))) (at App.js:67)
    in ThemeProvider (at App.js:64)
    in LiveAnnouncer (at App.js:63)
    in I18nextProvider (at App.js:62)
    in div (created by FullScreen)
    in FullScreen (at App.js:58)
    in App (at withPlugins.js:26)
    in WithPlugins(App) (created by ConnectFunction)
    in ConnectFunction (at MiradorViewer.js:32)
    in PluginProvider (at MiradorViewer.js:31)
    in Provider (at MiradorViewer.js:30)
mejackreed commented 4 years ago

@ewlarson We have noticed this same console error message. However everything still functions as expected. Are you seeing it crash the modal? This error message should not be present when a production build is created.

ewlarson commented 4 years ago

Thanks @mejackreed for the speeeeedy reply! Yeah, everything still works here too. Not seeing any crashes and haven't tried to run in prod yet.

If you come upon a fix, please bump me.