242: Post handler of module not callable

A module is a program which adds a feature that the Aneamal Translator itself does not provide. A module you use attempts to access the Aneamal Translator’s form API, but supplies an invalid post handler.

Solution

Mere users of the module are most probably unable to solve this error. It must be fixed by the module developers. You can contact them to make them aware of the problem.

For developers

If you want to use the Aneamal Translator’s form API, the PHP function returned by your module must be defined with an additional argument $post whose default value is of type string and either empty or a function name. That function is the post handler. Its name must be supplied as it would be called from the global space, so you need to prepend your namespace for a post handler defined in your namespace. Here is an example:

<?php namespace your\own\space;

// Your module's post handler
function postman ($_) {
	// stuff
}

// Your module's main function
return function ($_, $post = __NAMESPACE__ . "\\postman") {
	// stuff
};

Some modules need to get posted data from the form API, but do not need to add data to the form API. This is typically the case for modules that supply a submit button and process the submitted form data. Use an empty string as default value of the $post argument in that case:

<?php namespace your\own\space;

// Your module's main function
return function ($_, $post = '') {
	// stuff
};