View Issue Details

IDProjectCategoryView StatusLast Update
0035322mantisbthtmlpublic2025-03-01 18:40
Reporterraspopov Assigned Tocommunity  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformMicrosoftOSWindows ServerOS Version2022
Product Version2.27.0 
Target Version2.27.1Fixed in Version2.27.1 
Summary0035322: Incorrect absolute URL in the tab menu
Description

When the enable_project_documentation' option is set to 'ON', a documents menu is printed inproj_doc_page.php' and the first tab has the wrong absolute URL.

Steps To Reproduce

Open proj_doc_page.php with $g_enable_project_documentation = ON; and no local documentation (i.e. empty doc directory).

Additional Information

In print_menu() there seems to be a wrong if.

TagsNo tags attached.

Relationships

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

Activities

raspopov

raspopov

2025-02-17 12:01

reporter   ~0069867

PR: https://github.com/mantisbt/mantisbt/pull/2099

And of course all the tests failed with some unknown error...
Just like that, you add one test, and the whole testing system crashes.

How it looks to me:

C:\Projects\mantisbt>c:\php\php c:\php\phpunit-10.5.40.phar --testdox --filter HtmlApiTest
PHPUnit 10.5.40 by Sebastian Bergmann and contributors.
Runtime:       PHP 8.3.14
Configuration: C:\Projects\mantisbt\phpunit.xml
........                                                            8 / 8 (100%)
Time: 00:00.022, Memory: 26.00 MB
Html Api (Mantis\tests\Mantis\HtmlApi)
 ✔ Print menu with data set 0
 ✔ Print menu with data set 1
 ✔ Print menu with data set 2
 ✔ Print menu with data set 3
 ✔ Print menu with data set 4
 ✔ Print menu with data set 5
 ✔ Print menu with data set 6
 ✔ Print menu with data set 7
OK (8 tests, 8 assertions)
dregad

dregad

2025-02-21 18:29

developer   ~0069893

Hmmm. Pretty sloppy testing on my end when I "fixed" 0032557...

Related Changesets

MantisBT: master-2.27 aeaf1e1d

2025-02-17 11:49

raspopov

Committer: dregad


Details Diff
Fix generation of incorrect absolute URL

A wrong `if` in the print_menu().

Add HtmlApiTest.

Fixes 0035322

Cherry picked from commit f8b1bc9738017ed5833ea9f501704ae40a25e76f,
without the new HtmlAPiTest.php unit test, which leverage namespacing
that is only present in the master branch.

Signed-off-by: Damien Regad <dregad@mantisbt.org>
Affected Issues
0035322
mod - core/html_api.php Diff File
add - tests/Mantis/HtmlApiTest.php Diff File

MantisBT: master 6d322671

2025-02-17 11:49

raspopov

Committer: dregad


Details Diff
Fix generation of incorrect absolute URL

A wrong `if` in the print_menu().

Add HtmlApiTest.

Fixes 0035322
Affected Issues
0035322
mod - core/html_api.php Diff File
add - tests/Mantis/HtmlApiTest.php Diff File

MantisBT: master-2.27 a498179e

2025-02-21 18:49

dregad


Details Diff
Remove HtmlApiTest.php

Messed up the cherry-pick :-/

Partial revert of commit aeaf1e1d360c3dcb1e2a82434178e3c3c488be6d.

Issue 0035322
Affected Issues
0035322
rm - tests/Mantis/HtmlApiTest.php Diff