UpdateProfile hooks not working

anyone got issue with hooks with UpdateProfile ? i cant get pre or post hooks to fire and no error for some reason, maybe I am doing somehting wrong

I need to write a custom hook, so for testing I am using the example code in the modx documentation but it does not seem to work, does not seem to run the pre or post hooks.

https://docs.modx.com/3.x/en/extras/login/login.tutorials/using-pre-and-post-hooks

I tested it with Login version 1.9.11-pl (on MODX 3) and simple hooks that just log a message to the MODX error log. I couldn’t reproduce any issue. The hooks seem to run correctly.

[[!UpdateProfile?
   &preHooks=`mytestprehook`
   &postHooks=`mytestposthook`
]]

Snippet mytestprehook

<?php
$modx->log(modX::LOG_LEVEL_ERROR, 'Custom prehook runs');
return true;

thanks for the fast reply, running same versions.

I tired on a fresh install and it works something is causing issues on the install that I am using. will investigate many thanks

Be sure any hooks return true. Otherwise, hooks that come later will not execute.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.