View Issue Details

IDProjectCategoryView StatusLast Update
0019710Plugin - ReminderGeneralpublic2015-06-19 02:32
Reporterrakekniven Assigned Toatrol  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformLinuxOSUbuntuOS Version12.04
Summary0019710: No emails are sent out. Test gives result.
Description

My mantis does not send out remminder emails.
Basic mail feature works in mantis. We are using it daily.

I am running mantis v1.2.19
Just installed plugin and adjusted configuration (WebUI, not config file).

Added due dates to some issues and called "Reminder/scripts/bug_reminder_mail_test.php".

Any ideas?

Steps To Reproduce

Connected via ssh and using bash.
Calling "/usr/bin/php5 /sdb1/www/mantis/plugins/Reminder/scripts/bug_reminder_mail_test.php"
Query gave me one result.

Calling "/usr/bin/php5 /sdb1/www/mantis/plugins/Reminder/scripts/bug_reminder_mail.php" says:
PHP Notice: Undefined index: HTTP_USER_AGENT in /sdb1/www/mantis/core/mobile_api.php on line 41

TagsNo tags attached.

Relationships

related to 0013740 closedvboctor mantisbt Support auto-redirection from MantisBT to MantisTouch for mobile browsers 
related to 0019837 closedatrol mantisbt PHP notices if $_SERVER['HTTP_USER_AGENT'] is not set 

Activities

rakekniven

rakekniven

2015-05-12 09:43

reporter   ~0050744

Forgot to mention that I am using plugin version 1.22 from github.

rakekniven

rakekniven

2015-05-29 08:46

reporter   ~0050839

Any hints for me?

rakekniven

rakekniven

2015-06-03 08:06

reporter   ~0050865

Which information should I provide to track this issue?
I am willing to help :-)

rakekniven

rakekniven

2015-06-10 10:26

reporter   ~0050886

If I call "<webroot>/mantis/plugins/Reminder/scripts/bug_reminder_mail.php" in my browser I get:
"It is not allowed to run this script through the webserver."

So looking at code: /mantis/core/mobile_api.php on line 41 shows me:
$t_agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );

When calling it with php command line there is no value for "HTTP_USER_AGENT".

So above message makes sense.

Just a note to my issue.

Has anybody working due notifications with Reminder plugin and mantis 1.2.19 up and running?

atroladmin

atroladmin

2015-06-11 03:22

administrator   ~0050891

Change mobile_api.php from

function mobile_is_mobile_browser() {
// If api call rather than browser then return false.
if ( strstr( $_SERVER['SCRIPT_NAME'], '/api/' ) !== false ) {
return false;
}

to (add 3 lines)
function mobile_is_mobile_browser() {
{
if ( !isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
return false;
}
// If api call rather than browser then return false.
if ( strstr( $_SERVER['SCRIPT_NAME'], '/api/' ) !== false ) {
return false;
}

atrol

atrol

2015-06-11 03:25

developer   ~0050892

Last edited: 2015-06-11 03:29

Regression introduced by 0013740
Fixed in 1.3.x, see 0017186

rakekniven

rakekniven

2015-06-11 08:12

reporter   ~0050893

Better splitted my issue into two:

Sending of emails is working in the meantime. Looks like a php install issue?

Regarding cron warning:
Just added your lines to my mantis installation and cron is quiet now.
Thank you for helping out.

Will this be backported to 1.2.x series as well?

atrol

atrol

2015-06-14 08:31

developer   ~0050912

Will this be backported to 1.2.x series as well?
Maybe, at least I opened an issue for it, see 0019837.

rakekniven

rakekniven

2015-06-18 09:36

reporter   ~0050932

From my side you can close this issue.
We disabled plugin because of 0019848