cqroot / joplin-outline

A markdown outline (TOC) sidebar plugin for Joplin.
MIT License
219 stars 18 forks source link

Issue with link as a heading #72

Closed LittleBenjiBoy closed 1 year ago

LittleBenjiBoy commented 1 year ago

Issue

When I make a link like: <a href="https://www.google.com/">[Google](https://www.google.com/)</a> as a heading, the heading appears like: image

And when I click on the heading, I get this error:

Error
Joplin encountered a fatal error and could not continue.

To report the error, please copy the *entire content* of this page and post it on Joplin forum or GitHub.

If the error persists you may try to [restart in safe mode](https://github.com/cqroot/joplin-outline/issues/new#), which will temporarily disable all plugins.

Message
Blocked a frame with origin "file://" from accessing a cross-origin frame.

Version info
Joplin for Desktop

Copyright © 2016-2023 Laurent Cozic
Joplin 2.9.17 (prod, win32)

Client ID: xxx
Sync Version: 3
Profile Version: 41
Keychain Supported: No

Revision: a84a8e7
Plugins
[
    {
        "id": "joplin.plugin.benji.favorites",
        "name": "Favorites",
        "enabled": true,
        "version": "1.3.0"
    },
    {
        "id": "joplin.plugin.note.tabs",
        "name": "Note Tabs",
        "enabled": true,
        "version": "1.4.0"
    },
    {
        "id": "joplin.plugin.cmoptions",
        "name": "CodeMirror Options",
        "enabled": true,
        "version": "1.0.1"
    },
    {
        "id": "outline",
        "name": "Outline",
        "enabled": true,
        "version": "1.5.3"
    }
]
Stack trace
Error: Blocked a frame with origin "file://" from accessing a cross-origin frame.
    at C:\Users\xxx\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\services\plugins\hooks\useWebviewToPluginMessages.js:34:25
    at HTMLUnknownElement.callCallback (C:\Users\xxx\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:347:14)
    at Object.invokeGuardedCallbackDev (C:\Users\xxx\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:397:16)
    at invokeGuardedCallback (C:\Users\xxx\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:454:31)
    at safelyCallDestroy (C:\Users\xxx\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:19900:5)
    at C:\Users\xxx\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:20279:19
    at unstable_runWithPriority (C:\Users\xxx\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\scheduler\cjs\scheduler.development.js:643:12)
    at runWithPriority$2 (C:\Users\xxx\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:11305:10)
    at commitUnmount (C:\Users\xxx\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:20274:13)
    at commitNestedUnmounts (C:\Users\xxx\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:20349:5)
Component stack

    in ForwardRef(UserWebview) (created by ResizableLayout)
    in div (created by styled.div)
    in styled.div (created by ResizableLayout)
    in div (created by ResizableLayout)
    in div (created by ResizableLayout)
    in ResizableLayout (created by MainScreenComponent)
    in div (created by MainScreenComponent)
    in MainScreenComponent (created by Connect(MainScreenComponent))
    in Connect(MainScreenComponent) (created by NavigatorComponent)
    in div (created by NavigatorComponent)
    in NavigatorComponent (created by Connect(NavigatorComponent))
    in Connect(NavigatorComponent) (created by RootComponent)
    in ThemeProvider (created by RootComponent)
    in StyleSheetManager (created by RootComponent)
    in RootComponent (created by Connect(RootComponent))
    in Connect(RootComponent)
    in ErrorBoundary
    in Provider

What I expect

When I click on the heading, I expect the plugin to be able to jump to the heading that contained a link like the one provided above and show the title Google as a hyperlink. When I first got this plugin at an older version, I had no issues and it was working as expected, the heading was not blue and was showing as a normal heading, but I do not remember which version I was running.

cqroot commented 1 year ago

Thanks for your feedback. Try updating the plugin to 1.5.4 and the problem should have been resolved.