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

Monaco editor (SQL, Config Manager) fails to load when using child alias #5322

Closed
1 of 2 tasks
bdukes opened this issue Sep 29, 2022 · 3 comments · Fixed by #5328
Closed
1 of 2 tasks

Monaco editor (SQL, Config Manager) fails to load when using child alias #5322

bdukes opened this issue Sep 29, 2022 · 3 comments · Fixed by #5328
Assignees
Milestone

Comments

@bdukes
Copy link
Contributor

bdukes commented Sep 29, 2022

Description of bug

When using a child portal alias (e.g. example.com/site2, where example.com is the root of the DNN installation), the SQL and Config Manager requests for the Monaco editor script fail with a 404 because the alias is included in the request URL.

Steps to reproduce

  1. Create a DNN installation
  2. Add a child alias to the site
  3. Open the SQL page in the Persona Bar

Current behavior

The area where the editor should be is blank. There is a 404 and a JS error logged in the browser console.

Expected behavior

The editor loads.

Screenshots

screenshot of SQL page without editor and JS console with errors

Error information

SqlConsole.js?cdv=4789:748 GET https://….com/en-us/Resources/Shared/components/MonacoEditor/loader.js net::ERR_ABORTED 404

require.js?cdv=4789:1961 GET https://….com/en-us/Resources/Shared/components/MonacoEditor/editor/editor.main.js?cdv=4789 net::ERR_ABORTED 404

main.js?cdv=4789:52 Error: Script error for "vs/editor/editor.main"
http://requirejs.org/docs/errors.html#scripterror

main.js?cdv=4789:53 Uncaught Error: Script error for "vs/editor/editor.main"
http://requirejs.org/docs/errors.html#scripterror
at makeError (require.js?cdv=4789:168:17)
at HTMLScriptElement.onScriptError (require.js?cdv=4789:1738:36)

Additional context

This issue was introduced in #5066, which resolved a similar issue with 404s when the site is hosted in an IIS virtual directory. Instead of hardcoding / as the root, it changed the logic to use dnn.getVar('sf_siteRoot'). However, this is the root for Services Framework requests, which include the alias to determine the portal. This does not work for static requests. We may need to add an additional variable to indicate the installation root.

Affected version

  • 10.00.00 alpha build
  • 09.11.00 latest supported release
@bdukes bdukes added this to the 9.11.1 milestone Sep 29, 2022
@bdukes bdukes self-assigned this Sep 29, 2022
@BeniFreitag
Copy link
Contributor

@enfJoao
Copy link

enfJoao commented Jan 5, 2023

@bdukes This issue still persists in 9.11 for me.
Trying to find in /pt-pt/Resources/Shared/components/MonacoEditor/loader.js and fails.

@bdukes
Copy link
Contributor Author

bdukes commented Jan 5, 2023

This issue will be fixed in 9.11.1, the fix is not yet released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants