On Thu, 3 Mar 2005 08:14:52 -0600, ngungo ngungo@56degrees.com wrote:
I did exactly as you said here and the result is the same as you said (proof of the hook is running). Next, I want to see without the die("Testing!") statement. Something is wrong. It never comes back to the Display state after the Save Page was hit. It stays on Edit state all the time.
What return value did you give your function? According to docs/hooks.doc:
<< Hooks can return three possible values: * true: the hook has operated successfully * "some string": an error occurred; processing should stop and the error should be shown to the user * false: the hook has successfully done the work necessary and the calling function should skip
The last result would be for cases where the hook function replaces the main functionality.
Note that if you didn't explicitly return anything, it will implicitly return "NULL", which I think will evaluate to false, and thus cause the function to "skip". [See comments on http://uk.php.net/manual/en/functions.returning-values.php]