Opening a hyperlink in a Mantis ticket

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
Joselyne
Posts: 33
Joined: 14 Dec 2023, 15:59

Opening a hyperlink in a Mantis ticket

Post by Joselyne »

Hello,
Clicking on a link in a Mantis ticket will open that link in the current tab (the ticket), thereby losing the open ticket.
This link should be open in a new tab. How to do that?
Tkanks
Joselyne
cas
Posts: 1718
Joined: 11 Mar 2006, 16:08
Contact:

Re: Opening a hyperlink in a Mantis ticket

Post by cas »

Joselyn,
chek out this setting:
/**
* Convert URLs and e-mail addresses to html links.
*
* This flag controls whether URLs and email addresses are automatically
* converted to clickable links. Additionally, for URL links, it determines
* where they open when clicked (*target* attribute) and their type.
*
* The options below can be combined using bitwise operators (not all
* possible combinations make sense):
* - OFF Do not convert URLs or emails
* - LINKS_SAME_WINDOW Convert to links that open in the current window (DEFAULT)
* - LINKS_NEW_WINDOW Convert to links that open in a new window (overrides LINKS_SAME_WINDOW)
* - LINKS_NOOPENER Links have the `noopener` type (DEFAULT)
* {@link https://developer.mozilla.org/en-US/doc ... s/noopener}
* - LINKS_NOREFERRER Links have the `noreferrer` type, i.e. they omit the *Referer*
* header (implies LINKS_NOOPENER)
* {@link https://developer.mozilla.org/en-US/doc ... noreferrer}
*
* @global integer $g_html_make_links
*/
$g_html_make_links = LINKS_SAME_WINDOW | LINKS_NOOPENER;
Joselyne
Posts: 33
Joined: 14 Dec 2023, 15:59

Re: Opening a hyperlink in a Mantis ticket

Post by Joselyne »

Thank you very much.
It works well.
renataeliza
Posts: 6
Joined: 20 Jun 2014, 03:38

Re: Opening a hyperlink in a Mantis ticket

Post by renataeliza »

I have the follow error:
Mantis Version: 2.26.3

Fatal error: Uncaught Error: Undefined constant "LINKS_NOOPENER" in E:\Servidor\wamp64\www\mantis2\config_defaults_inc.php on line 2047
( ! ) Error: Undefined constant "LINKS_NOOPENER" in E:\Servidor\wamp64\www\mantis2\config_defaults_inc.php on line 2047
Call Stack
# Time Memory Function Location
1 0.0002 450576 {main}( ) ...\view_all_bug_page.php:0
2 0.0003 451368 require_once( 'E:\Servidor\wamp64\www\mantis2\core.php ) ...\view_all_bug_page.php:39
3 0.0041 607432 require_once( 'E:\Servidor\wamp64\www\mantis2\config_defaults_inc.php ) ...\core.php:92

Can anybody help me, please?
atrol
Site Admin
Posts: 8462
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Opening a hyperlink in a Mantis ticket

Post by atrol »

Code: Select all

Fatal error: Uncaught Error: Undefined constant "LINKS_NOOPENER" in E:\Servidor\wamp64\www\mantis2\config_defaults_inc.php on line 2047
Line 2047 of the original MantisBT 2.26.3 is an empty line.
Looks like you changed this file.
As a first measure, restore the original code.
Please use Search before posting and read the Manual
Post Reply