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

Client unsupported plugins check assumes map configuration contains at least one missing plugin #1390

Closed
sweco-semara opened this issue Aug 31, 2023 · 1 comment · Fixed by #1392
Labels
Milestone

Comments

@sweco-semara
Copy link
Contributor

sweco-semara commented Aug 31, 2023

Hajk client will currently always log the silent warning re. missing plugins in map config to the console, regardless if the config is clean/only contains active tools.

This bug is cosmetic only, mostly for developers or admins wanting to check that the Hajk config is correct. Current state is a bit confusing, but the map will still load without issues.

To Reproduce

  1. Clean up a map configuration, make sure no inactive or invalid plugins are referenced
  2. Open the browser console
  3. (Re-)load the map
  4. Check browser console

Expected behavior
Expect console to be quiet/empty if no errors.

Actual

The map configuration contains unavailable plugins: . Please check your map config and buildConfig.json.

Suggested fix
It seems there is a hard assumption in App.js that const unsupportedToolsFoundInMapConfig will always be set/contains at least one value. Suggested fix is to guard the join + console log operation on L397 in current master to not log if unsupportedToolsFoundInMapConfig is indeed empty.

@sweco-semara sweco-semara changed the title Client console logging assumes missing plug-ins in configuration Client unsupported tools check assumes map configuration contains at least one missing tool Aug 31, 2023
@sweco-semara sweco-semara changed the title Client unsupported tools check assumes map configuration contains at least one missing tool Client unsupported plugins check assumes map configuration contains at least one missing plugin Aug 31, 2023
@sweco-semara
Copy link
Contributor Author

Will provide a patch against develop based on @jacobwod existing fixes on feature/1360-property-checker + hstd-main branches, see comment in 1391.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants