Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor won't load after once using a schema that breaks it #40

Open
acka47 opened this issue Apr 29, 2020 · 3 comments
Open

Editor won't load after once using a schema that breaks it #40

acka47 opened this issue Apr 29, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@acka47
Copy link
Member

acka47 commented Apr 29, 2020

To reproduce (in Firefox or Chrome):

  1. Got to https://skohub.io/editor/ and the editor will load
  2. Load a schema that breaks the editor via the input box on the top , e.g. https://acka47.github.io/lrmi-profile/draft/schemas/schema.json (see Problem with schema including $ref to other schema in GH pages #39). The window will stay blank
  3. Load https://skohub.io/editor/ again directly or after loading a schema that works via the URL (e.g. https://skohub.io/editor/?schema=https://dini-ag-kim.github.io/lrmi-profile/draft/schemas/schema.json): The page stays white.
  4. Even restarting the browser (just tried it with Chrome) won't fix it.

The problem seems to be that the browser tries to load the last schema you chose and not the default schema. Best behaviour would be: Editor loads the last schema that was used but only if it does not break the editor, otherwise the default schema is used for loading.

@acka47 acka47 added the bug Something isn't working label Apr 29, 2020
@acka47
Copy link
Member Author

acka47 commented Apr 29, 2020

Just tried a system reboot and even after that it won't work again by loading the default schema.

@dr0i
Copy link
Member

dr0i commented Apr 30, 2020

Tried it on firefox 75.0, everything the same but 3), worked for me (showing not a blank site but the editor with the LRMI draft schema).
Re your problem: supposed that something is cached at the harddisk but couldn't found anything:

[~/.mozilla/firefox/$id] 
$ find . -name "cache" -ls |grep skohub

@literarymachine
Copy link
Contributor

Confirmed. This is probably due to bf9de82 where the schema URL is persisted to localStorage. It should obviously be validated before loading it. For now, you can delete the schemaURL key in the Application tab of the Developer Tools (in Chrome):

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants