• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Event Parameters passed by Event Handlers not working

D

Deleted member 190513

Guest
Today my custom events stopped working.
Is seams that this issue occurred just after an automatic update to Plesk Obsidian 18.0.36.
No other changes have been made, and the event handlers have been working for months before this.

The issue is that the event parameters are not translated to the correct data, but instead shown as the parameter name.

For example:
The parameter "NEW_CONTACT_NAME" for the event "Plesk user logged in" is shown in my logs as just "NEW_CONTACT_NAME" instead of "Admin" or "User123".

Anyone else have experienced this issue?
 
U R not alone. My events started doing this
Code:
"
Jul 17 07:14:02 s001 systemd[1]: Started Plesk task: Event handler with ID '7' for event 'mailname_update' (task=788 process=788 trace=2098:60f2833a2f09c).
Jul 17 07:14:02 s001 root: Mail account ${NEW_MAILNAME} is being updated
Jul 17 07:14:02 s001 root: ${NEW_MAILNAME} ${NEW_PASSWORD}
Jul 17 07:14:02 s001 systemd[1]: Started Plesk task: Event 'mailname_update' for object with ID '65' (task=789 process=789 trace=2098:60f2833a2f09c).
Jul 17 07:14:02 s001 systemd[1]: Started Plesk task: Event 'mailname_update' for object with ID '65' (task=790 process=790 trace=2098:60f2833a2f09c).
Jul 17 07:14:02 s001 systemd[1]: Stopped Plesk task: Event handler with ID '7' for event 'mailname_update' (task=788 process=788 trace=2098:60f2833a2f09c).
Jul 17 07:14:02 s001 systemd[1]: Stopped Plesk task: Event 'mailname_update' for object with ID '65' (task=789 process=789 trace=2098:60f2833a2f09c).
Jul 17 07:14:02 s001 systemd[1]: Stopped Plesk task: Event 'mailname_update' for object with ID '65' (task=790 process=790 trace=2098:60f2833a2f09c).
 
my sysinfo
CPUIntel(R) Xeon(R) CPU E3-1230 v3 @ 3.30GHz (8 core(s))
VersionPlesk Obsidian v18.0.36_build1800210604.22 os_Ubuntu 18.04
OSUbuntu 18.04.5 LTS
 
Further investigation shown that setting <NEW_MAILNAME> <NEW_PASSWORD> instead of ${NEW_MAILNAME} ${NEW_PASSWORD}
successfully passed mailbox name, but password was replaced with exactly "xxxxxx"
Please fix event handlers!
 
Further investigation shown that setting <NEW_MAILNAME> <NEW_PASSWORD> instead of ${NEW_MAILNAME} ${NEW_PASSWORD}
successfully passed mailbox name, but password was replaced with exactly "xxxxxx"
Please fix event handlers!
Thank you. Changing it to <NEW_CONTACT_NAME> seams to work.
 
Thank you! (and Google to let me find this post)
almost gone nuts, asking myself why event handlers did not work...

So, Plesk team, please please please fix your documentation!!!!!! (Event Handlers)
 
I am not sure whether the claim is correct. I am using scripts myself where for example ${NEW_DOMAIN_NAME} is a valid placeholder. Are we talking about the same thing, e.g. using the variable in a shell script?
 
I am not sure whether the claim is correct. I am using scripts myself where for example ${NEW_DOMAIN_NAME} is a valid placeholder. Are we talking about the same thing, e.g. using the variable in a shell script?
Good question. When running a quick test on my server it shows these three variables just fine ${NEW_DOMAIN_NAME}, ${NEW_MAILNAME} and ${NEW_PASSWORD}.

@ChristophRo, out of curiosity how are you using the event variables? And for which event specifically?
 
Gotcha. As far as I know events in Plesk have always functioned like this. Using the shell environment variables for use inside scripts and the <> style argument variables for use directly with the command. (Although the earlier posts in this thread suggest otherwise). This isn't well documented at all tho.
 
It can be seen in the screenshot in the docs, though. There the variables are enclosed in greater than and less than characters.
 
Back
Top