Issue Link URL incorrect in notification EMail

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
sachintha81
Posts: 20
Joined: 07 Mar 2019, 20:59

Issue Link URL incorrect in notification EMail

Post by sachintha81 »

When a new issue is registered, the issue URL of the notification email that the assignee receives seem to be broken.

Correct issue URL is normally of this form:

Code: Select all

http://{mysite}/tracker/view.php?id=39
However, in the notification EMail I get, the link looks like this:

Code: Select all

The following issue has been SUBMITTED. 
======================================================================
http://{mysite}/tracker#39
====================================================================== 
How do I fix this?


MantisBT and OS Versions:
--------------------------------

MantisBT: 2.19.0
PHP Version: 7.2.14
OS: Windows Server 2012 R2
IIS: 8.5.9600
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Issue Link URL incorrect in notification EMail

Post by cas »

did you do anything with short url's?
sachintha81
Posts: 20
Joined: 07 Mar 2019, 20:59

Re: Issue Link URL incorrect in notification EMail

Post by sachintha81 »

I don't understand - where do you mean?
sachintha81
Posts: 20
Joined: 07 Mar 2019, 20:59

Re: Issue Link URL incorrect in notification EMail

Post by sachintha81 »

If you can point out potentially problematic files, I can post the contents here.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Issue Link URL incorrect in notification EMail

Post by cas »

can you share core/config_inc.php ( please remove passwords and other confidential data)?
sachintha81
Posts: 20
Joined: 07 Mar 2019, 20:59

Re: Issue Link URL incorrect in notification EMail

Post by sachintha81 »

I assume you mean config/config_inc.php?

Here it is:

Code: Select all

<?php
$g_hostname               = 'localhost';
$g_db_type                = 'mysqli';
$g_database_name          = '{removed}';
$g_db_username            = '{removed}';
$g_db_password            = '{removed}';

$g_default_timezone       = 'America/Los_Angeles';

$g_crypto_master_salt     = 'iRY8t6h9E10cSB6I1fpxgaTHUML3MSK+VWF59HMXQSM=';

# --- Anonymous Access / Signup ---
$g_allow_signup				= ON;
$g_allow_anonymous_login	= OFF;
$g_anonymous_account		= '';

$g_enable_email_notification = ON; //enables the email messages
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_connection_mode = 'tls';
$g_smtp_port = 587;
$g_smtp_username = '{removed}'; //replace it with your gmail address
$g_smtp_password = '{removed}'; //replace it with your gmail password
$g_from_name = '{removed}';



$g_webmaster_email = '{removed}';
$g_from_email = '{removed}';
$g_return_path_email = '{removed}';

# --- Attachments / File Uploads ---
$g_allow_file_upload	= ON;
$g_dropzone_enabled		= ON;
$g_file_upload_method	= DATABASE; # or DISK
$g_absolute_path_default_upload_folder = 'C:/Windows/Temp/'; # used with DISK, must contain trailing \ or /.
$g_max_file_size		= 5120000;	# in bytes
$g_preview_attachments_inline_max_size = 256 * 1024;
$g_allowed_files		= 'TXT,txt,jpg,jpeg,png,bmp,log,as,html';		# extensions comma separated, e.g. 'php,html,java,exe,pl'
$g_disallowed_files		= 'exe';		# extensions comma separated



# --- Branding ---
$g_window_title			= 'Tracker';
$g_logo_image			= 'images/screen_logo.png';
$g_favicon_image		= 'images/screen-favicon.ico';



# --- Customized Status Labels ---


# --- Personal Configurations ---
/**
	 * An array of the fields to show on the bug report page.
	 *
	 * The following fields can not be included:
	 * id, project, date_submitted, last_updated, status,
	 * resolution, tags, fixed_in_version, projection, eta,
	 * reporter.
	 *
	 * The following fields must be included:
	 * category_id, summary, description.
	 *
	 * To overload this setting per project, then the settings must be included in the database through
	 * the generic configuration form.
	 *
	 * @global array $g_bug_report_page_fields
	 */
	$g_bug_report_page_fields = array(
		'category_id',
		'summary',
		#'view_state',
		'handler',
		'priority',
		#'severity',
		#'reproducibility',
		#'platform',
		#'os',
		#'os_version',
		#'product_version',
		#'product_build',
		#'target_version',
		'description',
		#'additional_info',
		#'steps_to_reproduce',
		'attachments',
		#'due_date',
	);

	/*
	An array of optional fields to show on the bug update page.
	The following optional fields are allowed: 
	additional_info, category_id, date_submitted, description, due_date, eta, fixed_in_version, handler, id, last_updated, os, os_version, platform, priority, product_build, product_version, project, projection, reporter, reproducibility, resolution, severity, status, steps_to_reproduce, summary, target_version, view_state.
	
	Fields not listed above cannot be shown on the bug update page. Visibility of custom fields is handled via the Manage => Manage Custom Fields administrator page.
	This setting can be set on a per-project basis by using the Manage => Manage Configuration administrator page.
	*/
	$g_bug_update_page_fields = array(
		'category_id',
		'summary',
		#'view_state',
		'handler',
		'priority',
		#'severity',
		#'reproducibility',
		#'platform',
		#'os',
		#'os_version',
		#'product_version',
		#'product_build',
		#'target_version',
		'description',
		#'additional_info',
		#'steps_to_reproduce',
		'attachments',
		#'due_date',
	);

	/**
	 * An array of the fields to show on the bug view page.
	 *
	 * To overload this setting per project, then the settings must be included in the database through
	 * the generic configuration form.
	 *
	 * @global array $g_bug_view_page_fields
	 */
	$g_bug_view_page_fields = array (
		'id',
		'project',
		'category_id',
		'summary',
		#'view_state',
		'date_submitted',
		'last_updated',
		'reporter',
		'handler',
		'priority',
		#'severity',
		#'reproducibility',
		'status',
		'resolution',
		'projection',
		'eta',
		#'platform',
		#'os',
		#'os_version',
		#'product_version',
		#'product_build',
		#'target_version',
		#'fixed_in_version',
		'description',
		#'additional_info',
		#'steps_to_reproduce',
		'tags',
		'attachments',
		#'due_date',
    );



$g_roadmap_view_threshold = NOBODY;
$g_view_changelog_threshold = NOBODY;

$g_priority_enum_string= '60:1 - Tool Down,50:2 - Chamber(s) Down,40:3 - Requires Engineering Intervention,30:4 - Infrequent or Easy to Recover,20:N/A,10:Select Priority';
$g_default_bug_priority = 10;
$g_severity_enum_string = '10:Default';

$g_show_realname = ON;

$g_handle_bug_threshold = DEVELOPER;
$g_show_monitor_list_threshold = REPORTER;
$g_monitor_add_others_bug_threshold = REPORTER;
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Issue Link URL incorrect in notification EMail

Post by cas »

see no issues in this file, asuming you did not adjust any other files, I have no clue why this is happening.
sachintha81
Posts: 20
Joined: 07 Mar 2019, 20:59

Re: Issue Link URL incorrect in notification EMail

Post by sachintha81 »

I did adjust other files, including email related ones, but nothing really to do with the email content.

email_api.php to adjust subject:
The file content is too big to post here so I'll attach.
Attachments
email_api.log
(76.26 KiB) Downloaded 359 times
sachintha81
Posts: 20
Joined: 07 Mar 2019, 20:59

Re: Issue Link URL incorrect in notification EMail

Post by sachintha81 »

That's the only file I really did make any changes that are meaningful in this context I guess. I changed the strings_english.txt but that's basically cosmetic changes and I can't imagine that would make a difference.
sachintha81
Posts: 20
Joined: 07 Mar 2019, 20:59

Re: Issue Link URL incorrect in notification EMail

Post by sachintha81 »

Found the cause of the problem.

Installing the latest version of BBCodePlus Plugin (Ver. 2.1.3) causes the issue. Details here:

https://github.com/mantisbt-plugins/BBC ... /issues/64
Post Reply