View Issue Details

IDProjectCategoryView StatusLast Update
0013103mantisbtapi soappublic2013-04-06 08:22
ReporterKimme der Schlimme Assigned Torombert  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.5 
Target Version1.2.6Fixed in Version1.2.6 
Summary0013103: Error when connecting to API via Mylin
Description

When using Mylin with a Mantis installation on a RHEL6 the following occures everytime.

--- 8< ---
Ticket download from http://asklepios.seracell.net/mantis/api/soap/mantisconnect.php [^] for task 994 failed : Error Type: SYSTEM NOTICE,
Error Description:
Undefined offset: 1,
Stack Trace:
mc_filter_api.php L26 mci_filter_db_get_available_queries(<integer>4, <string>'3')
UnknownFile L? mc_filter_get(<string>'xxx', <string>'xxx', <integer>4)
nusoap.php L4087 call_user_func_array(<string>'mc_filter_get', <Array> { [0] => 'xxx', [1] => 'xxx', [2] => 4 })
nusoap.php L3718 invoke_method()
mantisconnect.php L1499 service(<string>'<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" [^] xmlns:xsd="http://www.w3.org/2001/XMLSchema" [^] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:mc_filter_get [^] soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" [^] xmlns:ns1="http://futureware.biz/mantisconnect"><username [^] xsi:type="xsd:string">xxx</username><password xsi:type="xsd:string">xxx</password><project_id href="#id0"/></ns1:mc_filter_get><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" [^] xsi:type="xsd:integer" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">4</multiRef></soapenv:Body></soapenv:Envelope>') [^]
.
Error Type: SYSTEM NOTICE,
Error Description:
Undefined offset: 1,
Stack Trace:
mc_filter_api.php L26 mci_filter_db_get_available_queries(<integer>4, <string>'3')
UnknownFile L? mc_filter_get(<string>'xxx', <string>'xxx', <integer>4)
nusoap.php L4087 call_user_func_array(<string>'mc_filter_get', <Array> { [0] => 'xxx', [1] => 'xxx', [2] => 4 })
nusoap.php L3718 invoke_method()
mantisconnect.php L1499 service(<string>'<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" [^] xmlns:xsd="http://www.w3.org/2001/XMLSchema" [^] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:mc_filter_get [^] soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" [^] xmlns:ns1="http://futureware.biz/mantisconnect"><username [^] xsi:type="xsd:string">xxx</username><password xsi:type="xsd:string">xxx</password><project_id href="#id0"/></ns1:mc_filter_get><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" [^] xsi:type="xsd:integer" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">4</multiRef></soapenv:Body></soapenv:Envelope>') [^]

TagsNo tags attached.

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

rombert

rombert

2011-06-28 08:07

reporter   ~0029064

This stack trace is a bit unusual. Have you performed any customisations on your MantisBT instance, e.g. removed the default filter?

Kimme der Schlimme

Kimme der Schlimme

2011-06-28 08:18

reporter   ~0029065

No, I have a standard installation of Mantis and have not done any customizations.

The database has been updated several times, since the instance was setup in 2008.

I'm very unhappy with this Stacktrace since it gives me no clue where to point the problem ...

rombert

rombert

2011-06-28 08:25

reporter   ~0029066

The stack trace ends at http://git.mantisbt.org/?p=mantisbt.git;a=blob;f=api/soap/mc_filter_api.php;h=a265e981830049558089e113e5ca97d481f3adb6;hb=162c0d27022a889ad92a6354fbeac35b2ffc2761#l26

I can see that it calls mci_filter_db_get_available_queries and by examining the function I guess that $t_filter_detail is not properly formed ( http://git.mantisbt.org/?p=mantisbt.git;a=blob;f=api/soap/mc_api.php;h=b84de9dfd5fcf356cf32f7286ee7c0613d0250cc;hb=162c0d27022a889ad92a6354fbeac35b2ffc2761#l268 ) . Can you provide some more details about this filter?

Kimme der Schlimme

Kimme der Schlimme

2011-06-28 08:38

reporter   ~0029067

I hope I unstand you corretly: You guess the Filter-String ist not "wellformed"!?

The defined Filers used have standard-strings as names. To ensure this is not the Problem I deleted all Filters and got the same Error.

rombert

rombert

2011-06-28 08:46

reporter   ~0029068

Yes, that was my intuition. What interests me is the filter_string column.

Kimme der Schlimme

Kimme der Schlimme

2011-06-28 08:55

reporter   ~0029069

I have printed all the filter-strings into stderr. To me they dont look unusual.

Example: v8#a:41:{s:8:"_version";s:2:"v8";s:10:"_view_type";s:6:"simple";s:8:"per_page";i:50;s:17:"highlight_changed";i:6;s:13:"sticky_issues";b:1;s:4:"sort";s:12:"last_updated";s:3:"dir";s:4:"DESC";s:8:"platform";a:
1:{i:0;i:0;}s:2:"os";a:1:{i:0;i:0;}s:8:"os_build";a:1:{i:0;i:0;}s:10:"project_id";a:1:{i:0;i:-3;}s:11:"start_month";s:2:"06";s:9:"start_day";i:1;s:10:"start_year";s:4:"2011";s:9:"end_month";s:2:"06";s:7:"end
_day";s:2:"28";s:8:"end_year";s:4:"2011";s:6:"search";s:0:"";s:16:"and_not_assigned";b:0;s:17:"do_filter_by_date";b:0;s:10:"view_state";s:0:"";s:17:"relationship_type";i:-1;s:16:"relationship_bug";i:0;s:14:"
target_version";a:1:{i:0;s:1:"0";}s:10:"tag_string";s:0:"";s:10:"tag_select";s:0:"";s:13:"show_category";a:1:{i:0;i:0;}s:13:"show_severity";a:1:{i:0;i:0;}s:11:"show_status";a:1:{i:0;i:0;}s:11:"reporter_id";a
:1:{i:0;i:0;}s:10:"handler_id";a:1:{i:0;i:0;}s:12:"note_user_id";a:1:{i:0;i:0;}s:15:"show_resolution";a:1:{i:0;i:0;}s:13:"show_priority";a:1:{i:0;i:0;}s:10:"show_build";a:1:{i:0;i:0;}s:12:"show_version";a:1:
{i:0;i:0;}s:11:"hide_status";a:1:{i:0;i:90;}s:16:"fixed_in_version";a:1:{i:0;i:0;}s:12:"user_monitor";a:1:{i:0;i:0;}s:12:"show_profile";a:1:{i:0;i:0;}s:13:"custom_fields";a:1:{i:1;a:1:{i:0;i:0;}}}

rombert

rombert

2011-06-28 09:03

reporter   ~0029070

Yes, that one looks fine. Can you single out the row which causes the error?

Kimme der Schlimme

Kimme der Schlimme

2011-06-28 09:11

reporter   ~0029071

I'm not a PHP-Coder ... can you give me a Hint how to singe it out? Is there an Exception I my catch or is it simply the last line?

rombert

rombert

2011-06-28 09:15

reporter   ~0029072

Just before

$t_filter_detail = explode( '#', $row['filter_string'], 2 );

add something like

file_put_contents("/tmp/debug.log", "Read filter with id ".$row['id']);

Kimme der Schlimme

Kimme der Schlimme

2011-06-28 09:35

reporter   ~0029073

Thnx to your Help I was able to find and solve the Problem.

One of the Filters had no filter_string. I don't know why but deleting this filter solved the Problem-

Thank you very much for your Help.

rombert

rombert

2011-06-28 09:44

reporter   ~0029074

OK, thanks for confirming. I will still need to handle this in the SOAP API though, so I'll keep the task open.

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036433

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master-1.2.x 81a13248

2011-06-28 10:05

rombert


Details Diff
SOAP API: do not try to parse invalid filters

Fixes 0013103: Error when connecting to API via Mylin
Affected Issues
0013103
mod - api/soap/mc_api.php Diff File

MantisBT: master 8500ec92

2011-06-28 10:06

rombert


Details Diff
SOAP API: do not try to unserialize an invalid filter

Fixes 0013103: Error when connecting to API via Mylin
Affected Issues
0013103
mod - api/soap/mc_api.php Diff File