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

Missing local install plugin #9

Open
chris-steele opened this issue Apr 10, 2024 · 7 comments
Open

Missing local install plugin #9

chris-steele opened this issue Apr 10, 2024 · 7 comments
Labels
bug An error has occurred high priority Should be prioritised over all other issues question Discussion is required

Comments

@chris-steele
Copy link
Contributor

What happened?

If the contentplugin collection (in the database) has plugins marked as locally installed but the plugin is missing in the file system (i.e. not present in APP_DATA/data/contentplugins) the tool will error silently and the installation of other plugins may fail. The tool runs but editing content typically produces errors (citing missing schemas).

The error is thrown when attempting to read the plugin info here.

How should we deal with this scenario?

Expected behaviour

No response

Steps to reproduce

Have a plugin marked as locally installed in the database, but not present in the file system.

Authoring tool version

master

Framework version

No response

What browsers are you seeing the problem on?

No response

Relevant log output

No response

@taylortom
Copy link
Contributor

I'm not able to replicate this one with the latest deps, possibly resolved?

@taylortom taylortom moved this from New to Awaiting Response in adapt-authoring: The TODO Board Jun 19, 2024
@taylortom taylortom added the high priority Should be prioritised over all other issues label Jun 19, 2024
@chris-steele
Copy link
Contributor Author

chris-steele commented Jun 19, 2024

Unfortunately I can't recall the steps that led to this scenario, but it may have arisen with imports. I don't believe it is related to the paths issue solved here, however.

Will keep a watch for this issue.

@github-project-automation github-project-automation bot moved this from Awaiting Response to Merged in adapt-authoring: The TODO Board Jun 27, 2024
@taylortom
Copy link
Contributor

Please reopen if you manage to replicate

@chris-steele
Copy link
Contributor Author

chris-steele commented Jul 25, 2024

@taylortom just replicated this. I was using a database that had the usual core plugins. The DB also listed adapt-pageNav (marked as locally installed). However, this plugin was not on the file system. As per the original description the tool does not flag that the plugin is missing and errors silently; failing to continue with schema discovery+loading etc. The tool initialises and loads but as soon as you try to access/create content you get a schema error. Typically the error is that the text-component schema is missing, but inspecting the runtime schema collection reveals that many more are missing.

@chris-steele chris-steele reopened this Aug 1, 2024
@chris-steele
Copy link
Contributor Author

@taylortom to account for the above and prevent misleading schema errors I think we need to throw an error if plugins marked local are missing. Shall I do this?

@taylortom
Copy link
Contributor

taylortom commented Aug 1, 2024

We should be logging errors already - is this not happening?

https://github.com/adapt-security/adapt-authoring-contentplugin/blob/master/lib/ContentPluginModule.js#L95

@chris-steele
Copy link
Contributor Author

chris-steele commented Aug 1, 2024

There is an error (thrown by adapt-cli), but the problem plugin isn't identified and the tool continues to load and run. Perhaps this should be a fatal error as it renders content creation impossible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error has occurred high priority Should be prioritised over all other issues question Discussion is required
Projects
Development

No branches or pull requests

2 participants