Page 1 of 1

CSS in link to notification

Posted: 05 Jan 2017, 09:47
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

Re: CSS in link to notification

Posted: 05 Jan 2017, 13:22
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

Re: CSS in link to notification

Posted: 05 Jan 2017, 14:41
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

Re: CSS in link to notification

Posted: 10 Jan 2017, 22:51
by wglapiak
Thank you ;) It works as a charm

Re: CSS in link to notification

Posted: 10 Jan 2017, 23:01
by SL-Gundam
This change has now been committed in github
https://github.com/mantisbt-plugins/Ema ... 8a51288c1f