From 9064b2fcbb86c43a79b5584ecb601675940c6ca7 Mon Sep 17 00:00:00 2001 From: Wan Bachtiar Date: Fri, 11 Nov 2022 15:56:07 +1100 Subject: [PATCH] Patch for wizard URL path to take account of Discourse with subdirectory base URL. --- .../discourse/controllers/admin-wizards-wizard-show.js.es6 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/javascripts/discourse/controllers/admin-wizards-wizard-show.js.es6 b/assets/javascripts/discourse/controllers/admin-wizards-wizard-show.js.es6 index e6b0ad04..74c239fe 100644 --- a/assets/javascripts/discourse/controllers/admin-wizards-wizard-show.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-wizards-wizard-show.js.es6 @@ -36,6 +36,10 @@ export default Controller.extend({ @discourseComputed("wizard.id") wizardUrl(wizardId) { + let baseUrl = (window.location.href).split('/admin'); + if (baseUrl.length > 1) { + return baseUrl[0] + "/w/" + dasherize(wizardId); + } return window.location.origin + "/w/" + dasherize(wizardId); },