View Issue Details

IDProjectCategoryView StatusLast Update
0026110mantisbtadministrationpublic2020-02-18 03:21
Reporterkuz30 Assigned Todregad  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version2.22.0 
Target Version2.22.1Fixed in Version2.22.1 
Summary0026110: [Show content] for Complex Configuration option doesn't work when mod_rewrite is disabled
Description

Standalone production MantisBT with default configuration.
On page adm_config_report.php (Manage / Manage configuration / Configuration Report) for Configuration Option with type complex when clicking Value field [Show content] it doesn't work and produces browser console error:
`POST .../api/rest/internal/config_display 404

Steps To Reproduce
  1. Create Configuration Option with type complex
  2. Try to view value of clicking [Show content]
Additional Information

Workaround possible if you click Edit one by one.

TagsNo tags attached.
Attached Files
image.png (51,739 bytes)   
image.png (51,739 bytes)   

Relationships

related to 0025910 closedcproensa Simplify displaying of complex values in adm_config_report page 

Activities

dregad

dregad

2019-09-04 10:23

developer   ~0062725

Can you please check if there is any output (errors) in the browser's console ?
What web server are you using ?
REST API relies on URL rewriting to use /mantis/api/rest/xxx URLs. Can you confirm that URL rewriting is configured correctly ?

I faced a similar issue in the past in a plugin (see https://github.com/mantisbt-plugins/Snippets/issues/31). Can you try modifiying js/adm_config_report.js, at line 45

-                   content.load('api/rest/internal/config_display',req_data);
+                   content.load('api/rest/index.php/internal/config_display',req_data);
kuz30

kuz30

2019-09-05 03:11

reporter   ~0062730

Web server is Apache/2.4.7 (Ubuntu).
Module rewrite says Module rewrite already enabled.
When you click you get AJAX Post 404 in console (check image).

Your proposed modification resolves an issue.

image-2.png (19,491 bytes)   
image-2.png (19,491 bytes)   
dregad

dregad

2019-09-06 03:23

developer   ~0062738

@kuz30 thanks for the feedback.

I'll implement the proposed change in core as I think that internal REST API call need to work regardless of the webserver's configuration.

That being said, there is something wrong with your configuration. If you're planning to use the REST API externally, you'll need to sort this out otherwise the expected "nice" URLS like http://path.to/mantis/api/rest/<endpoint> will not work and you'll need to add the /index.php bit as per my earlier message

Note: the mod rewrite configuration is handled via an .htaccess file. Maybe your webserver config is blocking that.

dregad

dregad

2019-09-06 04:32

developer   ~0062742

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

dregad

dregad

2019-09-27 02:35

developer   ~0062922

Related Changesets

MantisBT: master c4a2cdd9

2019-09-04 07:30

dregad


Details Diff
Use REST API full path (with index.php)

On web servers where URL rewriting is not properly configured, calling
REST API with the "short" URL, e.g. http://my.mantis/rest/api/issues
does not work.

To make sure that core functionality relying on REST calls (via the
'internal' route) is working is expected even when URL rewriting is not
operational, we use the full path including the index.php file:
http://my.mantis/rest/api/index.php/internal/...

Fixes 0026110
Affected Issues
0026110
mod - js/adm_config_report.js Diff File
mod - js/common.js Diff File

MantisBT: master-2.22 a7413daa

2019-09-04 07:30

dregad


Details Diff
Use REST API full path (with index.php)

On web servers where URL rewriting is not properly configured, calling
REST API with the "short" URL, e.g. http://my.mantis/rest/api/issues
does not work.

To make sure that core functionality relying on REST calls (via the
'internal' route) is working is expected even when URL rewriting is not
operational, we use the full path including the index.php file:
http://my.mantis/rest/api/index.php/internal/...

Fixes 0026110

(cherry picked from commit c4a2cdd9d8d443a84287756959f595728a1524c9)
Affected Issues
0026110
mod - js/adm_config_report.js Diff File
mod - js/common.js Diff File