View Issue Details

IDProjectCategoryView StatusLast Update
0036818mantisbtapi soappublic2026-01-07 07:13
Reporterbrilimar Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSDebianOS VersionBookworm
Product Version2.28.0 
Target Version2.28.1Fixed in Version2.28.1 
Summary0036818: Call to undefined function date_timestamp_to_iso8601()
Description

Hi Team,

We might have found an issue with the SOAP API in 2.28.0.

While calling it we received the following error :

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>SOAP-ENV:Server</faultcode>
         <faultstring>Call to undefined function date_timestamp_to_iso8601()</faultstring>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</pre>
Steps To Reproduce

I don't have the exact SOAP request which provoked this issue but I should be able to provide it if required.

Additional Information

it looks like there is a missing include in api/soap/mc_api.php.

Here is the patch I used to fix our issue :

--- api/soap/mc_api.php.orig    2025-12-30 02:28:31.000000000 +0100
+++ api/soap/mc_api.php 2026-01-05 13:23:40.176746480 +0100
@@ -33,9 +33,11 @@
  * Webservice APIs
  *
  * @uses api_token_api.php
+ * @uses date_api.php
  */

 require_api( 'api_token_api.php' );
+require_api( 'date_api.php' );

 use Mantis\Exceptions\ClientException;
 use Mantis\Exceptions\LegacyApiFaultException;
TagsNo tags attached.

Relationships

related to 0034928 closeddregad Date conversion fails using a non-US date format in VersionUpdateCommand.php 

Activities

dregad

dregad

2026-01-07 03:14

developer   ~0070702

Hello and thanks for the report. I edited your Issue to fix code blocks.

I don't have the exact SOAP request which provoked this issue but I should be able to provide it if required.

As a general rule, it's always better for us to have detailed repro steps, it saves us the trouble of building them ourselves. However in that case it may indeed not be necessary.

I'll have a closer look and let you know.

dregad

dregad

2026-01-07 03:23

developer   ~0070703

Indeed a regression introduced in 2.28.0 by 0034928, commit MantisBT master b155dbfb

brilimar

brilimar

2026-01-07 06:26

reporter   ~0070704

Hello, thanks for the code blocks fix, I don't have the right to edit the issue AFAIK.

Feel free to let me know if you need more information.

Related Changesets

MantisBT: master b155dbfb

2025-02-26 18:43

dregad


Details Diff
New API functions for date conversions

As requested in PR review, it is no longer possible to provide timestamp
(version date order) as an integer to REST API /projects/{{id}}/versions
endpoints.

It is worth noting that a Unix timestamp can technically still be given,
using the `@{integer}` syntax, since that is a valid format for the
DateTimeImmutable constructor. This could change in the future, if we
decide to only allow ISO-8601 format.

The datetime parsing and generation logic has been standardized in 2 new
date API functions:
- date_string_to_timestamp()
- date_timestamp_to_iso8601()

Use the new functions in:
- date_strtotime()
- ApiObjectFactory: methods datetime() and datetimeString();
add new dateStringToTimestamp() method.
- VersionAddCommand
- VersionUpdateCommand

Fixes 0034928
Affected Issues
0034928, 0036818
mod - api/soap/mc_api.php Diff File
mod - core/commands/VersionAddCommand.php Diff File
mod - core/commands/VersionUpdateCommand.php Diff File
mod - core/date_api.php Diff File
mod - manage_proj_ver_update.php Diff File

MantisBT: master-2.28 7ae58efa

2026-01-07 07:11

dregad


Details Diff
Add missing require for date API in mc_api.php

Fixes 0036818
Affected Issues
0036818
mod - api/soap/mc_api.php Diff File