Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use the root_url which includes relative URL root for the setting macro

Oliver Günther06c244ec109c
diff --git a/lib/open_project/text_formatting/filters/setting_macros_filter.rb b/lib/open_project/text_formatting/filters/setting_macros_filter.rb
index d51cdf3e395..ca39cd2e4b0 100644
--- a/lib/open_project/text_formatting/filters/setting_macros_filter.rb
+++ b/lib/open_project/text_formatting/filters/setting_macros_filter.rb
@@ -64,7 +64,11 @@ module OpenProject::TextFormatting
end
def base_url
- OpenProject::Application.root_url
+ url_helpers.root_url.chomp('/')
+ end
+
+ def url_helpers
+ @url_helpers ||= OpenProject::StaticRouting::StaticRouter.new.url_helpers
end
##