Page 1 of 1

Custom Function calls fail on View Issues Page

Posted: 14 Jul 2015, 23:09
by ShadowKatmandu
I am using Mantis 1.2.19. When I go to the View Issues page, I get three errors like this one:

Code: Select all

SYSTEM WARNING: 'call_user_func_array() expects parameter 1 to be a valid callback, function 'custom_function_default_enum_job_numbers' not found or invalid function name' in '/home/e-smith/files/ibays/trackerdev/html/core/helper_api.php' line 372
The referenced function, as well as the ones in the other two errors, exist in core/custom_function_api.php. This was not a problem in our previous version, 1.2.15, which we are still using for our production version. The code has not changed for core/custom_function_api.php, it's the same in our 1.2.19 development environment as in our 1.2.15 production environment. It's a little confusing why these functions are referenced on the View Issues page as they aren't used there. That aside, why are three valid custom functions not being recognized by the View Issues page?

Re: Custom Function calls fail on View Issues Page

Posted: 15 Jul 2015, 05:54
by atrol
Check if there is a file custom_functions_inc.php in your old 1.2.15 installation.
If so, copy it to the new one.

Re: Custom Function calls fail on View Issues Page

Posted: 16 Jul 2015, 19:28
by ShadowKatmandu
I checked that, too, when I started getting this error, and core/custom_functions_inc.php is the same in dev as it is in production. It contains the override functions while core/custom_function_api.php contains the default functions.

Re: Custom Function calls fail on View Issues Page

Posted: 16 Jul 2015, 20:56
by ShadowKatmandu
Apparently, there was a change between the two versions where core/custom_function_api does not load the same way. Custom enumeration functions are not recognized. I moved the default enumeration functions to custom_functions_inc and everything is peachy now. Thanks for the help. :)