View Issue Details

IDProjectCategoryView StatusLast Update
0016995mantisbtdocumentationpublic2023-05-18 05:26
Reporterbadfiles Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0dev 
Target Version1.3.0-beta.1 
Summary0016995: Absolute g_manual_url becomes relative on proj_doc_page.php
Description

The default value of g_manual_url (fullpath) becomes part of the link to the manual.

TagsNo tags attached.

Relationships

related to 0032557 acknowledged Can not set full URL to $g_manual_url in config_inc.php 

Activities

dregad

dregad

2014-02-26 11:59

developer   ~0039558

https://github.com/mantisbt/mantisbt/pull/144

dregad

dregad

2014-06-11 12:33

developer   ~0040795

The documentation page will now build a correct link also for absolute URLs. If a relative path that does not exist is provided, the code falls back to the online manual (http://www.mantisbt.org/documentation.php)

Related Changesets

MantisBT: master b36ac41d

2014-06-02 02:38

dregad


Details Diff
Fix absolute URLs issue with 'User Documentation' link

This resolves the issue with absolute URLs specified in $g_manual_url
becoming relative on project documentation pages.

Following discussions in the pull request [1], the solution implements
additional logic in the print_doc_menu() function that checks whether
the provided URL is absolute or relative (based on presence of an URL
scheme):
- if relative, makes sure the local path exists
- if yes, build absolute URL using helper_mantis_url()
- if not, fall back to the online manual on
http://www.mantisbt.org/documentation.php
- if absolute, uses the URL as-is without check

Since this is currently the only use case for absolute URLs with
helper_mantis_url() and the documentation feature is deprecated, it made
more sense to have the logic in print_doc_menu() rather than creating a
new API function.

Fixes 0016995

[1] https://github.com/mantisbt/mantisbt/pull/144
Affected Issues
0016995
mod - config_defaults_inc.php Diff File
mod - core/html_api.php Diff File