CSS in link to notification

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
wglapiak
Posts: 2
Joined: 05 Jan 2017, 09:25

CSS in link to notification

Post by wglapiak »

Hello, I have some problem with this plugin
version of plugin 0.93.0

We have email notifications when somebody report bug.
In that mail I have every info of that issue including link to mantis.
If bug is reported via email I have some additional css/ in link to issue.

link when issue is reported via email

Code: Select all

domain.com/css/view.php?id=137


correct link (i.e. when somebody report bug directly from mantis)

Code: Select all

domain.com/view.php?id=137


It doesn't matter if I send from outlook or from webmail or its plain text or HTML
I think that is something about plugin because when bug is reported normally the link in notification is correct

Has somebody same problem?
I would by glad for any sugestions.
Thanks in advance
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: CSS in link to notification

Post by SL-Gundam »

I've seen this issue myself
So far i have not been able to find the cause.

For a temporary fix please open your config_inc.php and add (make sure you modify this to your domain url)

Code: Select all

$g_path='http://domain.com/';
That seems to fix the issue while we work on locating the source of the issue
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: CSS in link to notification

Post by SL-Gundam »

I might have a fix.
Please undo the previous suggested change and do the following

In EmailReporting.php on line 650 you will find the following

Code: Select all

if ( strncasecmp( $t_path, 'http', 4 ) === 0 && $t_path !== $t_mail_mantisbt_url_fix )
Please replace that line with this

Code: Select all

$t_absolute_path			= config_get_global( 'absolute_path' );
$t_dir_script_filename		= dirname( $_SERVER['SCRIPT_FILENAME'] ) . DIRECTORY_SEPARATOR;

if ( strncasecmp( $t_path, 'http', 4 ) === 0 && $t_path !== $t_mail_mantisbt_url_fix &&
$t_absolute_path === $t_dir_script_filename )
Please let me know whether this works
wglapiak
Posts: 2
Joined: 05 Jan 2017, 09:25

Re: CSS in link to notification

Post by wglapiak »

Thank you ;) It works as a charm
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: CSS in link to notification

Post by SL-Gundam »

This change has now been committed in github
https://github.com/mantisbt-plugins/Ema ... 8a51288c1f
Post Reply